This commit is contained in:
2023-02-16 10:36:15 -05:00
commit e1ee5022ca
5 changed files with 469 additions and 0 deletions

40
install/build.sh Normal file
View File

@@ -0,0 +1,40 @@
#!/bin/sh
if [ $(/usr/bin/id -u) != "0" ]; then
printf "[x] Must be run as root.\n"
exit 1
fi
WORKING_DIR=$(pwd)
SRC_DIR=$(pwd)/../src
parse_install_conf() {
source ${WORKING_DIR}/install.conf
if [ "$?" != "0" ]; then
printf "[x] install.conf not found.\n"
exit 1
fi
}
installpkg() {
install ${SRC_DIR}/gpkg /bin
install ${SRC_DIR}/syspkg /bin
install ${SRC_DIR}/gquery /bin
install ${SRC_DIR}/glist /bin
}
case $1 in
install)
parse_install_conf "$@"
installpkg "$@"
;;
update)
parse_install_conf "$@"
installpkg "$@"
;;
*)
printf "[x] Unknown option.\n"
exit 1
esac