forked from alnux/aps
add the sel(ect) utility
This commit is contained in:
parent
ba1b920608
commit
1ef353862d
2 changed files with 32 additions and 0 deletions
25
altools/sel
Executable file
25
altools/sel
Executable file
|
@ -0,0 +1,25 @@
|
|||
#!/bin/sh
|
||||
|
||||
#########################
|
||||
# Alnux sel(ect) Script #
|
||||
#########################
|
||||
. "/etc/al/lnver.v"
|
||||
case $1 in
|
||||
linux) case $2 in
|
||||
list) ls /usr/src/ | grep 'linux' &&
|
||||
ls -L /usr/src/linux 2>/dev/null
|
||||
;;
|
||||
set) lnver=${3} > /etc/al/lnver.v
|
||||
;;
|
||||
link) ln -sv /usr/src/linux-${lnver} /usr/src/linux &&
|
||||
mkdir -pv /var/aps/packages/linux/ &&
|
||||
echo "/boot/vmlinuz-linux-${lnver}" > /var/aps/packages/linux/payloadfiles &&
|
||||
echo "/usr/src/${lnver}" >> /var/aps/packages/linux/payloadfiles &&
|
||||
echo "pkg_config_deploy=true" > /var/aps/packages/linux/package &&
|
||||
echo "pkg_config_ver='${lnver}'" >> /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_depends=''" >> /var/aps/packages/linux/package
|
||||
;;
|
||||
esac
|
||||
esac
|
7
aps
7
aps
|
@ -68,6 +68,13 @@ install_local_package() {
|
|||
unset pkg_config_depends
|
||||
echo "[*] Install complete for package ${pkg_name}"
|
||||
}
|
||||
sync_deps(){
|
||||
echo ":: Syncing dependencies for ${1}"
|
||||
install_package_from_repo "${pkg_makedepends}"
|
||||
install_package_from_repo "${pkg_deps}"
|
||||
echo "[*] Install dependencies for ${1}"
|
||||
|
||||
}
|
||||
remove_local_package() {
|
||||
echo ":: Removing target ${1}..."
|
||||
pkg_path="${installed_pkg_database}/${1}"
|
||||
|
|
Loading…
Reference in a new issue