Merge pull request 'uhh, a patch for the alnux package and add the scripts to here' (#41) from Ohio2/repo:master into master
Reviewed-on: #41
This commit is contained in:
commit
9c5f5113f6
6 changed files with 73 additions and 9 deletions
15
alnux/build
15
alnux/build
|
@ -40,13 +40,12 @@ mkdir -p -m 1777 \
|
|||
$1/tmp \
|
||||
$1/var/tmp \
|
||||
|
||||
ln -sf $1/usr/bin $1/bin
|
||||
ln -sf $1/usr/bin $1/sbin
|
||||
ln -sf $1/bin $1/usr/sbin
|
||||
ln -sf $1/usr/lib $1/lib
|
||||
ln -sf $1/usr/lib $1/lib64
|
||||
ln -sf ${install_root}/usr/bin $1/bin
|
||||
ln -sf ${install_root}/usr/bin $1/sbin
|
||||
ln -sf ${install_root}/bin $1/usr/sbin
|
||||
ln -sf ${install_root}/usr/lib $1/lib
|
||||
ln -sf ${install_root}/usr/lib $1/lib64
|
||||
|
||||
ln -sf $1/lib $1/usr/lib64
|
||||
ln -sf $1/run $1/var/run
|
||||
ln -sf $1/run/lock $1/var/lock
|
||||
ln -sf ${install_root}/lib $1/usr/lib64
|
||||
ln -sf ${install_root}/run $1/var/run
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
pkg_config_deploy=true
|
||||
pkg_config_ver="0.7"
|
||||
pkg_config_ver="0.8"
|
||||
pkg_config_name="alnux"
|
||||
pkg_config_makedepends=""
|
||||
pkg_config_depends=""
|
||||
|
|
12
alnux/payload/etc/al/config
Executable file
12
alnux/payload/etc/al/config
Executable file
|
@ -0,0 +1,12 @@
|
|||
|
||||
##########################
|
||||
# A config file for the #
|
||||
# Alnux Packaging System #
|
||||
##########################
|
||||
temp_location="/var/tmp"
|
||||
install_root="/"
|
||||
installed_pkg_database="${install_root}/var/aps/installed"
|
||||
locpkg_database="${install_root}/var/aps/repos"
|
||||
lock="${install_root}/var/aps/lock"
|
||||
official="https://git.hippoz.xyz/alnux/repo"
|
||||
debug=off
|
18
alnux/payload/usr/bin/repo
Executable file
18
alnux/payload/usr/bin/repo
Executable file
|
@ -0,0 +1,18 @@
|
|||
#!/bin/sh
|
||||
|
||||
########################################
|
||||
# Repo, a repository manager for alnux #
|
||||
########################################
|
||||
. /etc/al/config
|
||||
case $1 in
|
||||
# add a repo
|
||||
add) git clone https://${3}/${2}.git ${install_root}/var/aps/repos/${2}
|
||||
echo "${2}" >> ${install_root}/etc/al/repo.conf
|
||||
;;
|
||||
# update a repo
|
||||
update) pushd && cd ${install_root}/var/aps/repos/${2} && git pull && popd ;;
|
||||
# destroy a repo (remove)
|
||||
destroy) rm -rfv ${install_root}/var/aps/repos/${2}
|
||||
sed -i "/^${2}/d" ${install_root}/etc/al/repo.conf
|
||||
;;
|
||||
esac
|
35
alnux/payload/usr/bin/sel
Executable file
35
alnux/payload/usr/bin/sel
Executable file
|
@ -0,0 +1,35 @@
|
|||
#!/bin/sh
|
||||
|
||||
#########################
|
||||
# Alnux sel(ect) Script #
|
||||
#########################
|
||||
. /etc/al/config
|
||||
if [ -f "${install_root}/etc/al/lnver" ]; then
|
||||
. /etc/al/lnver.cfg
|
||||
fi
|
||||
case $1 in
|
||||
linux) case $2 in
|
||||
# Lists all kernels
|
||||
list) ls ${install_root}/usr/src/ | grep 'linux' &&
|
||||
ls -L ${install_root}/usr/src/linux 2>/dev/null
|
||||
;;
|
||||
# Sets a kernel version
|
||||
set) lnver=${3}
|
||||
echo "lnver=${3}" > ${install_root}/etc/al/lnver.cfg
|
||||
;;
|
||||
# Links the set kernel version.
|
||||
link) ln -sv ${install_root}/usr/src/linux-${lnver} ${install_root}/usr/src/linux &&
|
||||
mkdir -pv ${install_root}/var/aps/packages/linux/ &&
|
||||
echo "/boot/vmlinuz-linux-${lnver}" > ${install_root}/var/aps/packages/linux/payloadfiles &&
|
||||
echo "/usr/src/${lnver}" >> ${install_root}/var/aps/packages/linux/payloadfiles &&
|
||||
echo "pkg_config_deploy=true" > ${install_root}/var/aps/packages/linux/package &&
|
||||
echo "pkg_config_ver='${lnver}'" >> ${install_root}/var/aps/packages/linux/package &&
|
||||
echo "pkg_config_name='linux'" >> ${install_root}/var/aps/packages/linux/package &&
|
||||
echo "pkg_config_makedepends=''" >> ${install_root}/var/aps/packages/linux/package &&
|
||||
echo "pkg_config_depends=''" >> ${install_root}/var/aps/packages/linux/package
|
||||
|
||||
;;
|
||||
# Destroys the symlink.
|
||||
destroy) rm -rfv ${install_root}/usr/src/linux ;;
|
||||
esac
|
||||
esac
|
BIN
alnux/payload/usr/share/man/man8/aps.8.gz
Normal file
BIN
alnux/payload/usr/share/man/man8/aps.8.gz
Normal file
Binary file not shown.
Loading…
Reference in a new issue