aps/install.sh

23 lines
557 B
Bash
Executable file

#!/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
export install_root=${prefix}
./aps sync alnux
install -v aps ${prefix}/usr/bin/ &&
install -v altools/sel ${prefix}/usr/bin/ &&
install -v altools/repo ${prefix}/usr/bin/ &&
install -v config/config ${prefix}/etc/al &&
install -v -Dm644 man/aps.8.gz ${prefix}/usr/share/man/man8/
fi