bump alnux and implement those scripts, a manual file for aps, and the config file

This commit is contained in:
Ohio2 2021-08-26 12:11:54 +02:00
parent c88a8e6601
commit 66df9b12ec
5 changed files with 66 additions and 1 deletions

View file

@ -1,5 +1,5 @@
pkg_config_deploy=true pkg_config_deploy=true
pkg_config_ver="0.7" pkg_config_ver="0.8"
pkg_config_name="alnux" pkg_config_name="alnux"
pkg_config_makedepends="" pkg_config_makedepends=""
pkg_config_depends="" pkg_config_depends=""

12
alnux/payload/etc/al/config Executable file
View 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
View 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
View 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

Binary file not shown.