25 lines
931 B
Bash
Executable file
25 lines
931 B
Bash
Executable file
#!/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
|