0.7rc
This commit is contained in:
13
scripts/glacier-cache-clear.sh
Normal file
13
scripts/glacier-cache-clear.sh
Normal file
@@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
# glacier-cache-clear
|
||||
# Script used to clear Glacier's cache
|
||||
|
||||
# Require the script to be run as root
|
||||
if [[ $(/usr/bin/id -u) -ne 0 ]]; then
|
||||
echo "[ X ] Please run Glacier as root."
|
||||
exit
|
||||
fi
|
||||
|
||||
echo "[ i ] Clearing cache..."
|
||||
cd /var/cache/glacier && rm *.tar.gz
|
||||
echo "[ i ] Cache was cleared."
|
||||
33
scripts/glacier-cache-install.sh
Normal file
33
scripts/glacier-cache-install.sh
Normal file
@@ -0,0 +1,33 @@
|
||||
#!/bin/sh
|
||||
# glacier-cache-install
|
||||
# Script used to install cached packages
|
||||
|
||||
# Require the script to be run as root
|
||||
if [[ $(/usr/bin/id -u) -ne 0 ]]; then
|
||||
echo "[ X ] Please run Glacier as root."
|
||||
exit
|
||||
fi
|
||||
|
||||
echo "[ ? ] Enter package name:" && read input
|
||||
echo "[ i ] Checking cache for $input.tar.gz"
|
||||
cd /var/cache/glacier && cp $input.tar.gz /tmp && cd /tmp
|
||||
if [ "$?" != "0" ]; then
|
||||
echo "[ X ] Could not fetch $input.tar.gz from cache." 1>&2
|
||||
exit 1
|
||||
fi
|
||||
echo "[ i ] Unpacking $input.tar.gz..."
|
||||
mkdir -v $input && mv -v $input.tar.gz $input && cd $input
|
||||
tar -xvf $input.tar.gz
|
||||
if [ "$?" != "0" ]; then
|
||||
echo "[ X ] Could not unpack $input.tar.gz" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
chmod +x INSTALL.sh
|
||||
chmod +x $input.ts.sh
|
||||
./INSTALL.sh # Actually executes installation script
|
||||
./$input.ts.sh
|
||||
echo "[ i ] Cleaning up..." # Status message
|
||||
mv -v $input-pkginfo.json /etc/glacier/pkginfo
|
||||
cd ..
|
||||
rm -rvf $input
|
||||
echo "[ i ] Operation completed."
|
||||
61
scripts/glacier-cache.sh
Normal file
61
scripts/glacier-cache.sh
Normal file
@@ -0,0 +1,61 @@
|
||||
#!/bin/sh
|
||||
# glacier-cache
|
||||
# Script used to download a package and cache it
|
||||
|
||||
# Require the script to be run as root
|
||||
echo "[ ? ] Enter package name:" && read input
|
||||
echo "[ i ] Installing $input.tar.gz"
|
||||
echo "Checking world..." && wget https://github.com/everest-linux/glacier-pkgs/raw/main/$GREPO1/$input.tar.gz
|
||||
if [ "$?" != "0" ]; then
|
||||
echo "[ i ] Not in world." 1>&2
|
||||
fi
|
||||
echo "Checking galaxy..." && wget https://gitub.com/everest-linux/glacier-pkgs/raw/main/$GREPO2/$input.tar.gz
|
||||
if [ "$?" != "0" ]; then
|
||||
echo "[ i ] Not in galaxy." 1>&2
|
||||
fi
|
||||
echo "Checking universe..." && wget https://github.com/everest-linux/glacier-pkgs/raw/main/$GREPO3/$input.tar.gz
|
||||
if [ "$?" != "0" ]; then
|
||||
echo "[ i ] Not in universe." 1>&2
|
||||
fi
|
||||
echo "Checking multiverse..." && wget https://github.com/everest-linux/glacier-pkgs/raw/main/$GREPO4/$input.tar.gz
|
||||
if [ "$?" != "0" ]; then
|
||||
echo "[ i ] Not in multiverse." 1>&2
|
||||
fi
|
||||
echo "Checking world-testing..." && wget https://github.com/everest-linux/glacier-pkgs/raw/main/$GREPO5/$input.tar.gz
|
||||
if [ "$?" != "0" ]; then
|
||||
echo "[ i ] Not in world-testing." 1>&2
|
||||
fi
|
||||
echo "Checking galaxy-testing..." && wget https://github.com/everest-linux/glacier-pkgs/raw/main/$GREPO6/$input.tar.gz
|
||||
if [ "$?" != "0" ]; then
|
||||
echo "[ i ] Not in galaxy-testing." 1>&2
|
||||
fi
|
||||
echo "Checking universe-testing..." && wget https://github.com/everest-linux/glacier-pkgs/raw/main/$GREPO7/$input.tar.gz
|
||||
if [ "$?" != "0" ]; then
|
||||
echo "[ i ] Not in universe-testing." 1>&2
|
||||
fi
|
||||
echo "Checking multiverse-testing.." && wget https://github.com/everest-linux/glacier-pkgs/raw/main/$GREPO8/$input.tar.gz
|
||||
if [ "$?" != "0" ]; then
|
||||
echo "[ i ] Not in multiverse-testing." 1>&2
|
||||
fi
|
||||
|
||||
echo "[ i ] Unpacking $input.tar.gz..."
|
||||
mkdir -v $input && mv -v $input.tar.gz $input && cd $input
|
||||
tar -xvf $input.tar.gz
|
||||
if [ "$?" != "0" ]; then
|
||||
echo "[ X ] Could not unpack $input.tar.gz" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
if [[ $(/usr/bin/id -u) -ne 0 ]]; then
|
||||
echo "[ X ] Please run Glacier as root."
|
||||
exit
|
||||
fi
|
||||
|
||||
echo "[ ? ] Enter package name:" && read input
|
||||
echo "[ i ] Caching $input.tar.gz"
|
||||
wget https://github.com/everest-linux/glacier-pkgs/raw/main/pkgs/$input.tar.gz
|
||||
if [ "$?" != "0" ]; then
|
||||
echo "[ X ] Could not get archive for $input." 1>&2
|
||||
exit 1
|
||||
fi
|
||||
mv $input.tar.gz /var/cache/glacier
|
||||
echo "[ i ] Operation completed."
|
||||
18
scripts/glacier-help.sh
Normal file
18
scripts/glacier-help.sh
Normal file
@@ -0,0 +1,18 @@
|
||||
#!/bin/sh
|
||||
|
||||
echo "Glacier Package Manager v0.5rc"
|
||||
echo "====================================================================="
|
||||
echo "An extremely light and fast ackage manager written entirely in shell."
|
||||
echo ""
|
||||
echo "glacier-install - Install a package"
|
||||
echo "glacier-update - Update a package"
|
||||
echo "glacier-remove - Remove a package"
|
||||
echo "glacier-query - Query a package"
|
||||
echo "glacier-cache - Add a package to the cache"
|
||||
echo "glacier-cache-install - Install a cached package"
|
||||
echo "glacier-cache-clear - Clear Glacier's cache"
|
||||
echo ""
|
||||
echo "IMPORTANT REMINDER - Glacier is unlike a traditional package manager where you apend a package name to the command. Instead, Glacier will ask you which package you wish to install."
|
||||
echo ""
|
||||
echo "Copyright (c) 2022 Everest Linux Developers"
|
||||
echo "This software includes no warranty whatsoever. See the GNU GPL v3.0 for more information."
|
||||
61
scripts/glacier-install.sh
Normal file
61
scripts/glacier-install.sh
Normal file
@@ -0,0 +1,61 @@
|
||||
#!/bin/sh
|
||||
# glacier-install
|
||||
# Script used to fetch installation scripts and run them
|
||||
|
||||
# Require the script to be run as root
|
||||
if [[ $(/usr/bin/id -u) -ne 0 ]]; then
|
||||
echo "[ X ] Please run Glacier as root."
|
||||
exit
|
||||
fi
|
||||
|
||||
echo "[ ? ] Enter package name:" && read input
|
||||
echo "[ i ] Installing $input.tar.gz"
|
||||
echo "Checking world..." && wget https://github.com/everest-linux/glacier-pkgs/raw/main/$GREPO1/$input.tar.gz
|
||||
if [ "$?" != "0" ]; then
|
||||
echo "[ i ] Not in world." 1>&2
|
||||
fi
|
||||
echo "Checking galaxy..." && wget https://gitub.com/everest-linux/glacier-pkgs/raw/main/$GREPO2/$input.tar.gz
|
||||
if [ "$?" != "0" ]; then
|
||||
echo "[ i ] Not in galaxy." 1>&2
|
||||
fi
|
||||
echo "Checking universe..." && wget https://github.com/everest-linux/glacier-pkgs/raw/main/$GREPO3/$input.tar.gz
|
||||
if [ "$?" != "0" ]; then
|
||||
echo "[ i ] Not in universe." 1>&2
|
||||
fi
|
||||
echo "Checking multiverse..." && wget https://github.com/everest-linux/glacier-pkgs/raw/main/$GREPO4/$input.tar.gz
|
||||
if [ "$?" != "0" ]; then
|
||||
echo "[ i ] Not in multiverse." 1>&2
|
||||
fi
|
||||
echo "Checking world-testing..." && wget https://github.com/everest-linux/glacier-pkgs/raw/main/$GREPO5/$input.tar.gz
|
||||
if [ "$?" != "0" ]; then
|
||||
echo "[ i ] Not in world-testing." 1>&2
|
||||
fi
|
||||
echo "Checking galaxy-testing..." && wget https://github.com/everest-linux/glacier-pkgs/raw/main/$GREPO6/$input.tar.gz
|
||||
if [ "$?" != "0" ]; then
|
||||
echo "[ i ] Not in galaxy-testing." 1>&2
|
||||
fi
|
||||
echo "Checking universe-testing..." && wget https://github.com/everest-linux/glacier-pkgs/raw/main/$GREPO7/$input.tar.gz
|
||||
if [ "$?" != "0" ]; then
|
||||
echo "[ i ] Not in universe-testing." 1>&2
|
||||
fi
|
||||
echo "Checking multiverse-testing.." && wget https://github.com/everest-linux/glacier-pkgs/raw/main/$GREPO8/$input.tar.gz
|
||||
if [ "$?" != "0" ]; then
|
||||
echo "[ i ] Not in multiverse-testing." 1>&2
|
||||
fi
|
||||
|
||||
echo "[ i ] Unpacking $input.tar.gz..."
|
||||
mkdir -v $input && mv -v $input.tar.gz $input && cd $input
|
||||
tar -xvf $input.tar.gz
|
||||
if [ "$?" != "0" ]; then
|
||||
echo "[ X ] Could not unpack $input.tar.gz" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
chmod +x INSTALL.sh
|
||||
chmod +x $input.ts.sh
|
||||
./INSTALL.sh # Actually executes installation script
|
||||
./$input.ts.sh
|
||||
echo "[ i ] Cleaning up..." # Status message
|
||||
mv -v $input-pkginfo.json /etc/glacier/pkginfo
|
||||
cd ..
|
||||
rm -rvf $input
|
||||
echo "[ i ] Operation completed."
|
||||
11
scripts/glacier-query.sh
Normal file
11
scripts/glacier-query.sh
Normal file
@@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
# glacier-query
|
||||
# Script used to query packages on the system
|
||||
|
||||
echo "[ ? ] Enter package name:" && read input
|
||||
cat /etc/glacier/pkginfo/$input-pkginfo.json
|
||||
cat /var/log/glacier/$input.timestamp
|
||||
if [ "$?" != "0" ]; then
|
||||
echo "[ X ] Package $input not found!" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
74
scripts/glacier-remove.sh
Normal file
74
scripts/glacier-remove.sh
Normal file
@@ -0,0 +1,74 @@
|
||||
#!/bin/sh
|
||||
# glacier-remove
|
||||
# Script used to uninstall packages
|
||||
|
||||
# Require the script to be run as root
|
||||
if [[ $(/usr/bin/id -u) -ne 0 ]]; then
|
||||
echo "[ X ] Please run Glacier as root."
|
||||
exit
|
||||
fi
|
||||
|
||||
echo "[ ? ] Enter package name:" && read input
|
||||
echo "[ i ] Installing $input.tar.gz"
|
||||
echo "Checking world..." && wget https://github.com/everest-linux/glacier-pkgs/raw/main/$GREPO1/$input.tar.gz
|
||||
if [ "$?" != "0" ]; then
|
||||
echo "[ i ] Not in world." 1>&2
|
||||
fi
|
||||
echo "Checking galaxy..." && wget https://gitub.com/everest-linux/glacier-pkgs/raw/main/$GREPO2/$input.tar.gz
|
||||
if [ "$?" != "0" ]; then
|
||||
echo "[ i ] Not in galaxy." 1>&2
|
||||
fi
|
||||
echo "Checking universe..." && wget https://github.com/everest-linux/glacier-pkgs/raw/main/$GREPO3/$input.tar.gz
|
||||
if [ "$?" != "0" ]; then
|
||||
echo "[ i ] Not in universe." 1>&2
|
||||
fi
|
||||
echo "Checking multiverse..." && wget https://github.com/everest-linux/glacier-pkgs/raw/main/$GREPO4/$input.tar.gz
|
||||
if [ "$?" != "0" ]; then
|
||||
echo "[ i ] Not in multiverse." 1>&2
|
||||
fi
|
||||
echo "Checking world-testing..." && wget https://github.com/everest-linux/glacier-pkgs/raw/main/$GREPO5/$input.tar.gz
|
||||
if [ "$?" != "0" ]; then
|
||||
echo "[ i ] Not in world-testing." 1>&2
|
||||
fi
|
||||
echo "Checking galaxy-testing..." && wget https://github.com/everest-linux/glacier-pkgs/raw/main/$GREPO6/$input.tar.gz
|
||||
if [ "$?" != "0" ]; then
|
||||
echo "[ i ] Not in galaxy-testing." 1>&2
|
||||
fi
|
||||
echo "Checking universe-testing..." && wget https://github.com/everest-linux/glacier-pkgs/raw/main/$GREPO7/$input.tar.gz
|
||||
if [ "$?" != "0" ]; then
|
||||
echo "[ i ] Not in universe-testing." 1>&2
|
||||
fi
|
||||
echo "Checking multiverse-testing.." && wget https://github.com/everest-linux/glacier-pkgs/raw/main/$GREPO8/$input.tar.gz
|
||||
if [ "$?" != "0" ]; then
|
||||
echo "[ i ] Not in multiverse-testing." 1>&2
|
||||
fi
|
||||
|
||||
echo "[ i ] Unpacking $input.tar.gz..."
|
||||
mkdir -v $input && mv -v $input.tar.gz $input && cd $input
|
||||
tar -xvf $input.tar.gz
|
||||
if [ "$?" != "0" ]; then
|
||||
echo "[ X ] Could not unpack $input.tar.gz" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
echo "[ ? ] Enter package name:" && read input
|
||||
echo "[ i ] Preparing to remove $input..."
|
||||
wget https://github.com/everest-linux/glacier-pkgs/raw/main/pkgs/$input.tar.gz
|
||||
if [ "$?" != "0" ]; then
|
||||
echo "[ X ] Could not get archive for $input." 1>&2
|
||||
exit 1
|
||||
fi
|
||||
echo "[ i ] Fetching removal instructions..."
|
||||
mkdir -v $input && mv -v $input.tar.gz $input && cd $input
|
||||
tar -xvf $input.tar.gz
|
||||
if [ "$?" != "0" ]; then
|
||||
echo "[ X ] Could not unpack $input.tar.gz" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
chmod +x REMOVE.sh
|
||||
./REMOVE.sh
|
||||
rm /var/log/glacier/$input.timestamp
|
||||
echo "[ i ] Cleaning up..."
|
||||
cd ..
|
||||
rm -rvf $input
|
||||
rm /etc/glacier/pkginfo/$input-pkginfo.json
|
||||
echo "[ i ] Operation completed."
|
||||
76
scripts/glacier-update.sh
Normal file
76
scripts/glacier-update.sh
Normal file
@@ -0,0 +1,76 @@
|
||||
#!/bin/sh
|
||||
# glacier-update
|
||||
# Script used to update packages
|
||||
|
||||
# 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
|
||||
echo "[ X ] Please run Glacier as root."
|
||||
exit
|
||||
fi
|
||||
|
||||
echo "[ ? ] Enter package name:" && read input
|
||||
echo "[ i ] Updating $input.tar.gz..."
|
||||
wget https://github.com/everest-linux/glacier-pkgs/raw/main/pkgs/$input.tar.gz
|
||||
if [ "$?" != "0" ]; then
|
||||
echo "[ X ] Could not get archive for $input." 1>&2
|
||||
exit 1
|
||||
fiecho "[ ? ] Enter package name:" && read input
|
||||
echo "[ i ] Installing $input.tar.gz"
|
||||
echo "Checking world..." && wget https://github.com/everest-linux/glacier-pkgs/raw/main/$GREPO1/$input.tar.gz
|
||||
if [ "$?" != "0" ]; then
|
||||
echo "[ i ] Not in world." 1>&2
|
||||
fi
|
||||
echo "Checking galaxy..." && wget https://gitub.com/everest-linux/glacier-pkgs/raw/main/$GREPO2/$input.tar.gz
|
||||
if [ "$?" != "0" ]; then
|
||||
echo "[ i ] Not in galaxy." 1>&2
|
||||
fi
|
||||
echo "Checking universe..." && wget https://github.com/everest-linux/glacier-pkgs/raw/main/$GREPO3/$input.tar.gz
|
||||
if [ "$?" != "0" ]; then
|
||||
echo "[ i ] Not in universe." 1>&2
|
||||
fi
|
||||
echo "Checking multiverse..." && wget https://github.com/everest-linux/glacier-pkgs/raw/main/$GREPO4/$input.tar.gz
|
||||
if [ "$?" != "0" ]; then
|
||||
echo "[ i ] Not in multiverse." 1>&2
|
||||
fi
|
||||
echo "Checking world-testing..." && wget https://github.com/everest-linux/glacier-pkgs/raw/main/$GREPO5/$input.tar.gz
|
||||
if [ "$?" != "0" ]; then
|
||||
echo "[ i ] Not in world-testing." 1>&2
|
||||
fi
|
||||
echo "Checking galaxy-testing..." && wget https://github.com/everest-linux/glacier-pkgs/raw/main/$GREPO6/$input.tar.gz
|
||||
if [ "$?" != "0" ]; then
|
||||
echo "[ i ] Not in galaxy-testing." 1>&2
|
||||
fi
|
||||
echo "Checking universe-testing..." && wget https://github.com/everest-linux/glacier-pkgs/raw/main/$GREPO7/$input.tar.gz
|
||||
if [ "$?" != "0" ]; then
|
||||
echo "[ i ] Not in universe-testing." 1>&2
|
||||
fi
|
||||
echo "Checking multiverse-testing.." && wget https://github.com/everest-linux/glacier-pkgs/raw/main/$GREPO8/$input.tar.gz
|
||||
if [ "$?" != "0" ]; then
|
||||
echo "[ i ] Not in multiverse-testing." 1>&2
|
||||
fi
|
||||
echo "[ i ] Unpacking $input.tar.gz..."
|
||||
mkdir -v $input && mv -v $input.tar.gz $input && cd $input
|
||||
tar -xvf $input.tar.gz
|
||||
if [ "$?" != "0" ]; then
|
||||
echo "[ X ] Could not unpack $input.tar.gz" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
rm /var/log/glacier/$input.timestamp
|
||||
echo "[ i ] Unpacking $input,tar.gz..."
|
||||
mkdir -v $input && mv -v $input.tar.gz $input && cd $input
|
||||
tar -xvf $input.tar.gz
|
||||
if [ "$?" != "0" ]; then
|
||||
echo "[ X ] Could not unpack $input.tar.gz" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
chmod +x UPDATE.sh
|
||||
chmod +x $input.ts.sh
|
||||
./UPDATE.sh
|
||||
./$input.ts.sh
|
||||
echo "[ i ] Cleaning up..."
|
||||
mv -v $input-pkginfo.json /etc/glacier/pkginfo
|
||||
mv $input.timestamp /var/log/glacier
|
||||
cd ..
|
||||
rm -rvf $input
|
||||
echo "[ i ] Operation completed."
|
||||
Reference in New Issue
Block a user