release 0.1rc

This commit is contained in:
everest 2022-03-09 22:01:26 +00:00 committed by GitHub
parent 41b095a399
commit a3cc13e0ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 119 additions and 0 deletions

19
INSTALL-GLACIER.sh Normal file
View File

@ -0,0 +1,19 @@
#!/bin/sh
# Glacier Installation Script
mkdir /etc/glacier && echo "[ i ] Creating /etc/glacier..."
mkdir /etc/glacier/pkginfo && echo "Creating /etc/glacier/pkginfo..."
chmod +x glacier-install.sh
chmod +x glacier-remove.sh
chmod +x glacier-update.sh
chmod +x glacier-query.sh
echo "[ i ] Installing glacier..."
cp glacier-install.sh glacier-install
cp glacier-remove.sh glacier-remove
cp glacier-update.sh glacier-update
cp glacier-query.sh glacier-query
mv glacier-install /bin
mv glacier-remove /bin
mv glacier-update /bin
mv glacier-query /bin
echo "[ i ] Glacier has finished installing successfully

15
glacier-help.sh Normal file
View File

@ -0,0 +1,15 @@
#!/bin/sh
echo "Glacier Package Manager"
echo "====================================================================="
echo "An extremely light and fast ackage manager written entirely in shell."
echo ""
echo "glacier-install - Install a program"
echo "glacier-update - Update a program"
echo "glacier-remove - Remove a program"
echo "glacier-query - Query a program"
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."

26
glacier-install.sh Normal file
View File

@ -0,0 +1,26 @@
#!/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 ] Downloading $input.tar.gz"
wget https://github.com/everest-linux/glacier-pkgs/raw/main/pkgs/$input.tar.gz || echo "[ X ] Failed to get archive for $input."
echo "[ i ] Unpacking $input.tar.gz..."
tar -xvf $input.tar.gz || echo "[ X ] Failed to unpack archive for $input."
cd $input
chmod +x INSTALL.sh
./INSTALL.sh # Actually executes installation script
echo "[ i ] Cleaning up..." # Status message
mv $input-pkginfo.json /etc/glacier/pkginfo
rm $input.tar.gz
rm INSTALL.sh
rm UPDATE.sh
rm REMOVE.sh # Cleans up installation files
rm LICENSE.md
echo "[ i ] Finished installation of $input." || echo "[ X ] Installation of $input failed." # Indicates success || Indicates failure

6
glacier-query.sh Normal file
View File

@ -0,0 +1,6 @@
#!/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

28
glacier-remove.sh Normal file
View File

@ -0,0 +1,28 @@
#!/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 ] Preparing to remove $input..."
wget https://github.com/everest-linux/glacier-pkgs/raw/main/pkgs/$input.tar.gz || echo "[ X ] Failed to prepare $input for removal."
echo "[ i ] Fetching removal instructions..."
tar -xvf $input.tar.gz || echo "[ X ] Failed to fetch removal instructions."
cd $input
chmod +x REMOVE.sh
./REMOVE.sh
echo "[ i ] Cleaning up..."
rm /etc/glacier/pkginfo/$input-pkginfo.json
rm INSTALL.sh
rm UPDATE.sh
rm REMOVE.sh
rm LICENSE.md
rm $input.tar.gz
rm $input-pkginfo.json
rm $input
echo "[ i ] Finished removal of $input." || echo "[ X ] Removal of $input failed."

25
glacier-update.sh Normal file
View File

@ -0,0 +1,25 @@
#!/bin/sh
# glacier-update
# Script used to update 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 ] Downloading $input.tar.gz..."
wget https://github.com/everest-linux/glacier-pkgs/raw/main/pkgs/$input.tar.gz || echo "[ X ] Failed to get archive for $input"
echo "[ i ] Unpacking $input,tar.gz..."
tar -xvf $input.tar.gz || echo "[ X ] Failed to unpack archive for $input."
cd $input
chmod +x UPDATE.sh
./UPDATE.sh
rm /etc/glacier/pkginfo/$input-pkginfo.json
mv $input-pkginfo.json /etc/glacier/pkginfo
rm $input.tar.gz
rm INSTALL.sh
rm UPDATE.sh
rm REMOVE.sh
echo "[ i ] Finished installation of $input." || echo "[ X ] Installation of $input failed."