lmfao
This commit is contained in:
parent
b8e8d9996a
commit
f473df35b6
3 changed files with 21 additions and 5 deletions
10
altools/repo
Normal file → Executable file
10
altools/repo
Normal file → Executable 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
|
||||||
|
|
10
altools/sel
10
altools/sel
|
@ -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
|
||||||
|
|
|
@ -14,6 +14,8 @@ if [ ${prefix} == / ]; then
|
||||||
fi
|
fi
|
||||||
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
|
||||||
|
|
Loading…
Reference in a new issue