Add repo and install.sh

This commit is contained in:
Ohio2 2021-08-24 07:32:32 +02:00
parent 1ef353862d
commit 6510fd4132
4 changed files with 34 additions and 1 deletions

13
altools/repo Normal file
View file

@ -0,0 +1,13 @@
#!/bin/sh
########################################
# Repo, a repository manager for alnux #
########################################
if [ $(whoami) != root ]; then
echo "[E] Run as root!"
kill 2
else
case $1 in
add) git clone https://${3}/${2}.git /var/aps/repos/${2} ;;
esac
fi

View file

@ -5,7 +5,8 @@
#########################
. "/etc/al/lnver.v"
case $1 in
linux) case $2 in
linux) if [ $(whoami) != root ]; then
case $2 in
list) ls /usr/src/ | grep 'linux' &&
ls -L /usr/src/linux 2>/dev/null
;;
@ -22,4 +23,5 @@ case $1 in
echo "pkg_config_depends=''" >> /var/aps/packages/linux/package
;;
esac
fi
esac

0
aps Normal file → Executable file
View file

18
install.sh Executable file
View file

@ -0,0 +1,18 @@
#!/bin/sh
##########################
# INSTALL SCRIPT FOR APS #
##########################
case $1 in
--prefix) prefix=$2 ;;
*) prefix=/
esac
if [ ${prefix} == / ]; then
if [ $(whoami) != root ]; then
echo '[E] You must run as root!'
kill 2
fi
else
install -v aps ${prefix}/usr/bin/ &&
install -v altools/sel ${prefix}/usr/bin/
fi