diff --git a/scripts/glacier-cache-clear.sh b/scripts/glacier-cache-clear.sh deleted file mode 100644 index 5e4db2a..0000000 --- a/scripts/glacier-cache-clear.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh -# glacier-cache-clear -# Script used to clear Glacier's cache - -# Glacier preloading - -source /etc/glacier/hooks.sh - -# Require the script to be run as root -if [[ $(/usr/bin/id -u) -ne 0 ]]; then - printf "\033[1;31m [ $error ] \033[m Please run Glacier as root." - exit -fi - -printf "\033[1;34m [ i ] \033[m Clearing cache... " -cd /var/cache/glacier && rm * -printf "\033[1;32m [ $check ] \033[m Cache cleared." diff --git a/scripts/glacier-cache-install.sh b/scripts/glacier-cache-install.sh deleted file mode 100644 index 6afb688..0000000 --- a/scripts/glacier-cache-install.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/sh -# glacier-cache-install -# Script used to install cached packages - -# Glacier preloading - -source /etc/glacier/hooks.sh - -# 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 - -printf "\033[1;34m [ ? ] \033[m Enter package name: " && read input -printf "\033[1;34m [ i ] \033[m Checking cache for $input.tar.gz... " -cd /var/cache/glacier && cp $input.tar.gz /tmp && cd /tmp -if [ "$?" != "0" ]; then - printf "\033[1;31m [ $error ] \033[m Could not fetch package from cache. " 1>&2 - exit 1 -fi -printf "\033[1;34m [ i ] \033[m Unpacking $input.tar.gz... " -mkdir $input && mv $input.tar.gz $input && cd $input -tar -xf $input.tar.gz -if [ "$?" != "0" ]; then - printf "\033[1;31m [ $error ] \033[m 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 -printf "\033[1;34m [ i ] \033[m Cleaning up... " # Status message -mv -v $input-pkginfo.json /etc/glacier/pkginfo -cd .. -rm -rvf $input -printf "\033[1;32m [ $check ] \033[m Operation completed." diff --git a/scripts/glacier-cache.sh b/scripts/glacier-cache.sh deleted file mode 100644 index 2def25d..0000000 --- a/scripts/glacier-cache.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh -# glacier-cache -# Script used to download a package and cache it - -# Glacier preloading - -source /etc/glacier/hooks.sh - -# Require the script to be run as root -if [[ $(/usr/bin/id -u) -ne 0 ]]; then - printf "\033[1;31m [ $error ] \033[m Please run Glacier as root." - exit -fi - -printf "\033[1;34m [ ? ] \033[m Enter package name: " && read input -printf "\033[1;34m [ i ] \033[m Caching $input.tar.gz...\n" -printf "\033[1;34m [ i ] \033[m Checking databases... " && wget $GREPO1/$input.tar.gz -q --show-progress || wget $GREPO2/$input.tar.gz -q --show-progress || wget $GREPO3/$input.tar.gz -q --show-progress || wget $GREPO4/$input.tar.gz -q --show-progress || wget $GREPO5/$input.tar.gz -q --show-progress || wget $GREPO6/$input.tar.gz -q --show-progress || wget $GREPO7/$input.tar.gz -q --show-progress || wget $GREPO8/$input.tar.gz -q --show-progress -if [ "$?" != "0" ]; then - printf "\033[1;31m [ $error ] \033[m Package not found. " 1>&2 - exit 1 -fi -mv $input.tar.gz /var/cache/glacier -printf "\033[1;32m [ $check ] \033[m Operation completed." diff --git a/scripts/glacier-help.sh b/scripts/glacier-help.sh deleted file mode 100644 index fb46b67..0000000 --- a/scripts/glacier-help.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/sh - -echo "Glacier Package Manager v1.3" -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 will ask you which package to install, glacier-install will not work." -echo "" -echo "Glacier - Copyright (C) 2022 Everest Linux" -echo "This program comes with ABSOLUTELY NO WARRANTY; for details see section 15 of the GNU GPL v3." -echo "This is free software, and you are welcome to redistribute it under certain conditions; see the GNU GPL v3 for details." diff --git a/scripts/glacier-install.sh b/scripts/glacier-install.sh deleted file mode 100644 index 7d254f9..0000000 --- a/scripts/glacier-install.sh +++ /dev/null @@ -1,51 +0,0 @@ -#!/bin/sh -# glacier-install -# Script used to fetch installation scripts and run them - -# Define colors -export red="\033[1;31m" -export green="\033[1;32m" -export yellow="\033[1;33m" -export blue="\033[1;34m" -export reset="\033[m" - -# Define unicode symbols -export check="\xE2\x9C\x93" -export error="\xE2\x9C\x95" -export warning="\x21" -export question="\x3F" - -# Glacier preloading - -source /etc/glacier/hooks.sh - -# Require the script to be run as root -if [[ $(/usr/bin/id -u) -ne 0 ]]; then - printf "\033[1;31m [ \xE2\x9C\x95 ] \033[m Please run Glacier as root." - exit -fi - -printf "\033[1;34m [ ? ] \033[m Enter package name: " && read input -printf "\033[1;34m [ i ] \033[m Installing $input.tar.gz...\n" -printf "\033[1;34m [ i ] \033[m Checking databases... " && wget $GREPO1/$input.tar.gz -q --show-progress || wget $GREPO2/$input.tar.gz -q --show-progress || wget $GREPO3/$input.tar.gz -q --show-progress || wget $GREPO4/$input.tar.gz -q --show-progress || wget $GREPO5/$input.tar.gz -q --show-progress || wget $GREPO6/$input.tar.gz -q --show-progress || wget $GREPO7/$input.tar.gz -q --show-progress || wget $GREPO8/$input.tar.gz -q --show-progress -if [ "$?" != "0" ]; then - printf "\033[1;31m [ \xE2\x9C\x95 ] \033[m Package not found. " 1>&2 - exit 1 -fi -printf "\033[1;34m [ i ] \033[m Unpacking $input.tar.gz...\n" -mkdir $input && mv $input.tar.gz $input && cd $input -tar -xf $input.tar.gz -if [ "$?" != "0" ]; then - printf "\033[1;31m [ \xE2\x9C\x95 ] \033[m Could not unpack $input.tar.gz. " 1>&2 - exit 1 -fi -chmod +x INSTALL.sh -chmod +x $input.ts.sh -printf "\033[1;34m [ i ] \033[m Executing installation instructions...\n" -./INSTALL.sh # Actually executes installation script -./$input.ts.sh -printf "\033[1;34m [ i ] \033[m Cleaning up...\n" # Status message -mv $input-pkginfo.json /etc/glacier/pkginfo -cd .. -rm -rf $input -printf "\033[1;32m [ \xE2\x9C\x93 ] \033[m Operation completed.\n" diff --git a/scripts/glacier-query.sh b/scripts/glacier-query.sh deleted file mode 100644 index 1939176..0000000 --- a/scripts/glacier-query.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -# glacier-query -# Script used to query packages on the system - -# Glacier preloading - -source /etc/glacier.conf - -printf "\033[1;34m [ ? ] \033[m Enter package name: " && read input -cat /etc/glacier/pkginfo/$input-pkginfo.json -cat /var/log/glacier/$input.timestamp -if [ "$?" != "0" ]; then - printf "\033[1;31m [ $error ] \033[m Package not found. " 1>&2 - exit 1 -fi diff --git a/scripts/glacier-remove.sh b/scripts/glacier-remove.sh deleted file mode 100644 index 884425b..0000000 --- a/scripts/glacier-remove.sh +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/sh -# glacier-remove -# Script used to uninstall packages - -# Define colors -export red="\033[1;31m" -export green="\033[1;32m" -export yellow="\033[1;33m" -export blue="\033[1;34m" -export reset="\033[m" - -# Define unicode symbols -export check="\xE2\x9C\x93" -export error="\xE2\x9C\x95" -export warning="\x21" -export question="\x3F" - -# Glacier preloading - -source /etc/glacier/hooks.sh - -# Require the script to be run as root -if [[ $(/usr/bin/id -u) -ne 0 ]]; then - printf "\033[1;31m [ $error ] \033[m Please run Glacier as root." - exit -fi - -printf "\033[1;34m [ ? ] \033[m Enter package name: " && read input -printf "\033[1;34m [ i ] \033[m Removing $input.tar.gz...\n" -printf "\033[1;34m [ i ] \033[m Checking databases... " && wget $GREPO1/$input.tar.gz -q --show-progress || wget $GREPO2/$input.tar.gz -q --show-progress || wget $GREPO3/$input.tar.gz -q --show-progress || wget $GREPO4/$input.tar.gz -q --show-progress || wget $GREPO5/$input.tar.gz -q --show-progress || wget $GREPO6/$input.tar.gz -q --show-progress || wget $GREPO7/$input.tar.gz -q --show-progress || wget $GREPO8/$input.tar.gz -q --show-progress -if [ "$?" != "0" ]; then - printf "\033[1;31m [ $error ] \033[m Package not found. " 1>&2 - exit 1 -fi -printf "\033[1;34m [ i ] \033[m Unpacking $input.tar.gz...\n" -mkdir $input && mv $input.tar.gz $input && cd $input -tar -xf $input.tar.gz -if [ "$?" != "0" ]; then - printf "\033[1;31m [ $error ] \033[m Could not unpack $input.tar.gz. " 1>&2 - exit 1 -fi -chmod +x REMOVE.sh -./REMOVE.sh -rm /var/log/glacier/$input.timestamp -printf "\033[1;34m [ i ] \033[m Cleaning up... \n" # Status message -cd .. -rm -rf $input -rm /etc/glacier/pkginfo/$input-pkginfo.json -printf "\033[1;32m [ $check ] \033[m Operation completed.\n" diff --git a/scripts/glacier-update.sh b/scripts/glacier-update.sh deleted file mode 100644 index 111a316..0000000 --- a/scripts/glacier-update.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh -# glacier-update -# Script used to update packages - -# Glacier preloading - -source /etc/glacier/hooks.sh - -# Require Glacier to be run as root -if [[ $(/usr/bin/id -u) -ne 0 ]]; then - printf "\033[1;31m [ $error ] \033[m Please run Glacier as root." - exit -fi - -printf "\033[1;34m [ ? ] \033[m Enter package name: " && read input -printf "\033[1;34m [ i ] \033[m Installing $input.tar.gz...\n" -printf "\033[1;34m [ i ] \033[m Checking databases... " && wget $GREPO1/$input.tar.gz -q --show-progress || wget $GREPO2/$input.tar.gz -q --show-progress || wget $GREPO3/$input.tar.gz -q --show-progress || wget $GREPO4/$input.tar.gz -q --show-progress || wget $GREPO5/$input.tar.gz -q --show-progress || wget $GREPO6/$input.tar.gz -q --show-progress || wget $GREPO7/$input.tar.gz -q --show-progress || wget $GREPO8/$input.tar.gz -q --show-progress -if [ "$?" != "0" ]; then - printf "\033[1;31m [ $error ] \033[m Package not found. " 1>&2 - exit 1 -fi -printf "\033[1;34m [ i ] \033[m Unpacking $input.tar.gz...\n" -mkdir $input && mv $input.tar.gz $input && cd $input -tar -xf $input.tar.gz -if [ "$?" != "0" ]; then - printf "\033[1;31m [ $error ] \033[m Could not unpack $input.tar.gz. " 1>&2 - exit 1 -fi -rm /var/log/glacier/$input.timestamp -chmod +x UPDATE.sh -chmod +x $input.ts.sh -./UPDATE.sh -./$input.ts.sh -printf "\033[1;34m [ i ] \033[m Cleaning up...\n" -mv $input-pkginfo.json /etc/glacier/pkginfo -mv $input.timestamp /var/log/glacier -cd .. -rm -rf $input -printf "\033[1;32m [ $check ] \033[m Operation completed.\n"