This commit is contained in:
lw-everestlinux 2022-10-14 08:38:21 -04:00
parent f9a8a22cad
commit 57ab6b4955
2 changed files with 0 additions and 78 deletions

View File

@ -1,71 +0,0 @@
#!/bin/sh
# Glacier package checker
/etc/gpc.conf
source $(pwd)/gpc.conf #remove before release
INSCRIPT=INSTALL.sh
UPSCRIPT=UPDATE.sh
RMSCRIPT=REMOVE.sh
PKGINFO=*-pkginfo.json
TIMESTAMP=*.ts.sh
case $1 in
check)
printf " Searching for package directory...\n"
if [ -d "$2" ]; then
printf "$green $2 exists.$reset\n"
else
printf "$red $2 does not exist.$reset\n"
exit 1
fi
cd $2
printf " Searching for instruction scripts in package directory...\n"
if [ -f $INSCRIPT -a -f $UPSCRIPT -a -f $RMSCRIPT ]; then
printf "$green Instruction scripts exist.$reset\n"
else
printf "$red Instruction scripts do not exist.$reset\n"
exit 1
fi
printf " Searching for miscellaneous files...\n"
if [ -f $PKGINFO -a -f $TIMESTAMP ]; then
printf "$green $2.pkginfo and $2.ts.sh exist.$reset\n"
else
printf "$red $2.pkginfo and $2.ts.sh do not exist.$reset\n"
exit 1
fi
;;
mkpkg)
printf "$blue Making package...$reset\n"
cd $2
tar -czvf $2.tar.gz *
printf "$blue Creating timestamp...$reset\n"
sha256sum $2.tar.gz >> $2.checksum
if [ "$?" != "0" ]; then
printf "$red Failed to make package.$reset\n"
exit 1
fi
printf "$green Finished making package$reset\n"
exit 0
;;
-h|--help)
printf "gpc - test and create Glacier packages\n"
printf "\n"
printf "gpc {-h|--help} show this message and exit\n"
printf "gpc {-v|--version} show the version and exit\n"
printf "gpc {check} check a package for errors\n"
printf "gpc {mkpkg} create a package from a directory\n"
printf "\n"
printf "This program is licensed under the GNU GPL v3.0\n"
printf "You should have recieved a copy along with this program.\n"
printf "If not, see <https://www.gnu.org/licenses/gpl-3.0.en.html>\n"
exit 0
;;
-v|--version)
printf "gpc v1.0.0\n"
exit 0
esac

View File

@ -1,7 +0,0 @@
# /etc/gpc.conf
# Colors and unicode symbols to be used
export red="\033[1;31m"
export green="\033[1;32m"
export blue="\033[1;34m"
export reset="\033[m"