Compare commits

..

4 commits

Author SHA1 Message Date
Ohio2
391795714b fix merge conflict 2021-08-25 11:39:48 +02:00
Ohio2
f473df35b6 lmfao 2021-08-25 11:37:56 +02:00
Ohio2
b8e8d9996a pcm 2021-08-25 06:44:51 +02:00
62c9558d7c Merge pull request 'instead of /tmp/alroot we should use /var/tmp/alroot, /tmp for /var/tmp' (#7) from Ohio2/aps:master into master
Reviewed-on: alnux/aps#7
2021-08-07 20:18:34 +01:00
3 changed files with 20 additions and 4 deletions

10
altools/repo Normal file → Executable file
View file

@ -8,6 +8,14 @@ if [ $(whoami) != root ]; then
kill 2 kill 2
else else
case $1 in case $1 in
add) git clone https://${3}/${2}.git /var/aps/repos/${2} ;; # add a repo
add) git clone https://${3}/${2}.git /var/aps/repos/${2}
echo "${2}" >> /etc/al/repo.conf
;;
# update a repo
update) pushd && cd /var/aps/repos/${2} && git pull && popd ;;
# destroy a repo (remove)
destroy) rm -rfv /var/aps/repos/${2} ;;
esac esac
fi fi

View file

@ -3,15 +3,18 @@
######################### #########################
# Alnux sel(ect) Script # # Alnux sel(ect) Script #
######################### #########################
. "/etc/al/lnver.v" . "/etc/al/lnver.cfg"
case $1 in case $1 in
linux) if [ $(whoami) != root ]; then linux) if [ $(whoami) != root ]; then
case $2 in case $2 in
# Lists all kernels
list) ls /usr/src/ | grep 'linux' && list) ls /usr/src/ | grep 'linux' &&
ls -L /usr/src/linux 2>/dev/null ls -L /usr/src/linux 2>/dev/null
;; ;;
set) lnver=${3} > /etc/al/lnver.v # Sets a kernel version
set) lnver=${3} > /etc/al/lnver.cfg
;; ;;
# Links the set kernel version.
link) ln -sv /usr/src/linux-${lnver} /usr/src/linux && link) ln -sv /usr/src/linux-${lnver} /usr/src/linux &&
mkdir -pv /var/aps/packages/linux/ && mkdir -pv /var/aps/packages/linux/ &&
echo "/boot/vmlinuz-linux-${lnver}" > /var/aps/packages/linux/payloadfiles && echo "/boot/vmlinuz-linux-${lnver}" > /var/aps/packages/linux/payloadfiles &&
@ -21,7 +24,10 @@ case $1 in
echo "pkg_config_name='linux'" >> /var/aps/packages/linux/package && echo "pkg_config_name='linux'" >> /var/aps/packages/linux/package &&
echo "pkg_config_makedepends=''" >> /var/aps/packages/linux/package && echo "pkg_config_makedepends=''" >> /var/aps/packages/linux/package &&
echo "pkg_config_depends=''" >> /var/aps/packages/linux/package echo "pkg_config_depends=''" >> /var/aps/packages/linux/package
;; ;;
# Destroys the symlink.
destroy) rm -rfv /usr/src/linux ;;
esac esac
fi fi
esac esac

View file

@ -15,5 +15,7 @@ if [ ${prefix} == / ]; then
else else
install -v aps ${prefix}/usr/bin/ && install -v aps ${prefix}/usr/bin/ &&
install -v altools/sel ${prefix}/usr/bin/ && install -v altools/sel ${prefix}/usr/bin/ &&
install -v altools/repo ${prefix}/usr/bin/ install -v altools/repo ${prefix}/usr/bin/ &&
${prefix}/usr/bin/aps sync alnux &&
install -v tools/* /usr/bin/
fi fi