Update glacier-update.sh
This commit is contained in:
parent
999da41b24
commit
59cbc4c4b4
@ -2,7 +2,7 @@
|
|||||||
# glacier-update
|
# glacier-update
|
||||||
# Script used to update packages
|
# Script used to update packages
|
||||||
|
|
||||||
# Require the script to be run as root
|
# Script messes shit up if you don't run as root so thats why this is here
|
||||||
if [[ $(/usr/bin/id -u) -ne 0 ]]; then
|
if [[ $(/usr/bin/id -u) -ne 0 ]]; then
|
||||||
echo "[ X ] Please run Glacier as root."
|
echo "[ X ] Please run Glacier as root."
|
||||||
exit
|
exit
|
||||||
@ -16,18 +16,16 @@ if [ "$?" != "0" ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
echo "[ i ] Unpacking $input,tar.gz..."
|
echo "[ i ] Unpacking $input,tar.gz..."
|
||||||
|
mkdir -v $input && mv -v $input.tar.gz $input && cd $input
|
||||||
tar -xvf $input.tar.gz
|
tar -xvf $input.tar.gz
|
||||||
if [ "$?" != "0" ]; then
|
if [ "$?" != "0" ]; then
|
||||||
echo "[ X ] Could not unpack $input.tar.gz" 1>&2
|
echo "[ X ] Could not unpack $input.tar.gz" 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
cd $input
|
|
||||||
chmod +x UPDATE.sh
|
chmod +x UPDATE.sh
|
||||||
./UPDATE.sh
|
./UPDATE.sh
|
||||||
rm /etc/glacier/pkginfo/$input-pkginfo.json
|
echo "[ i ] Cleaning up..."
|
||||||
mv $input-pkginfo.json /etc/glacier/pkginfo
|
mv -v $input-pkginfo.json /etc/glacier/pkginfo
|
||||||
rm $input.tar.gz
|
cd ..
|
||||||
rm INSTALL.sh
|
rm -rvf $input
|
||||||
rm UPDATE.sh
|
|
||||||
rm REMOVE.sh
|
|
||||||
echo "[ i ] Operation completed."
|
echo "[ i ] Operation completed."
|
||||||
|
Loading…
Reference in New Issue
Block a user