#!/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