Author SHA1 Message Date
everest b4e28b39a8 Add files via upload 2022-05-31 13:06:14 +00:00
everest 56eee46ca6 Delete glacier.conf 2022-05-31 13:05:37 +00:00
everest 6ee344e556 Delete README.md 2022-05-31 13:05:29 +00:00
everest 7f74261a2d Delete LICENSE 2022-05-31 13:05:22 +00:00
everest 08f0b393a2 Delete scripts directory 2022-05-31 13:05:14 +00:00
everest bbc1452841 Delete WGET-INSTALL.sh 2022-05-31 13:04:59 +00:00
everest 3db46f6ba0 Delete UPDATE-GLACIER.sh 2022-05-31 13:04:53 +00:00
everest ce8d3944d9 Delete UNINSTALL-GLACIER.sh 2022-05-31 13:02:36 +00:00
everest 6358608828 Delete INSTALL-GLACIER.sh 2022-05-31 13:02:30 +00:00
everest 7e505404a6 Update README.md 2022-05-17 18:07:26 +00:00
everest 12cfa49d20 Update README.md 2022-05-17 14:14:28 +00:00
everest 110c8fcd21 Update README.md 2022-05-10 12:23:59 +00:00
everest f3778f7ea4 Update glacier-help.sh 2022-05-10 12:22:01 +00:00
everest 9e9f705fa3 Update glacier-cache.sh 2022-05-06 14:02:35 +00:00
everest ed024fdab0 Update glacier-update.sh 2022-05-06 14:02:09 +00:00
everest e0ce15a616 Update glacier-remove.sh 2022-05-06 14:01:47 +00:00
everest bcf274a714 Update glacier-install.sh 2022-05-06 14:01:25 +00:00
everest a82e25c980 Update glacier-help.sh 2022-05-06 11:51:19 +00:00
everest 2f21ad528f Update glacier-help.sh 2022-05-05 14:23:09 +00:00
everest 47f2dddd46 Update WGET-INSTALL.sh 2022-05-05 14:11:26 +00:00
everest 94154b0bf2 Delete multirepo-test 2022-05-04 14:50:52 +00:00
everest 09b3305b1b Update README.md 2022-05-03 21:25:48 +00:00
everest 0628947fcc Update glacier-cache-clear.sh 2022-05-03 21:25:04 +00:00
everest 637b4b50d1 Update glacier-cache.sh 2022-05-03 21:24:20 +00:00
everest 7deb3bbb60 Update glacier-update.sh 2022-05-03 21:23:53 +00:00
everest 114757443d Update glacier-remove.sh 2022-05-03 21:23:35 +00:00
everest a4627aa1ed Update glacier-install.sh 2022-05-03 20:46:49 +00:00
everest 9c8c686bf3 Add files via upload 2022-05-03 20:41:48 +00:00
everest c67ea416d3 Update glacier.conf 2022-05-03 20:41:17 +00:00
everest 167bfce674 Update glacier.conf 2022-05-03 17:30:23 +00:00
everest 1188467cd0 Update glacier-cache.sh 2022-05-03 16:54:09 +00:00
everest 6048a99fb2 Update glacier-update.sh 2022-05-03 15:40:50 +00:00
everest bdf412eab6 Update glacier-remove.sh 2022-05-03 15:39:18 +00:00
everest 0e616b6771 Update glacier-install.sh 2022-05-03 15:37:28 +00:00
everest 12bb41baae Update README.md 2022-05-03 15:33:27 +00:00
everest 37b2d829e3 Update glacier-help.sh 2022-05-02 16:53:21 +00:00
everest dd017d57d1 Update glacier-help.sh 2022-05-02 16:51:51 +00:00
everest c83c6a6cbc Update glacier-cache-clear.sh 2022-05-02 16:43:14 +00:00
everest 81b2247840 Update glacier-cache-install.sh 2022-05-02 16:42:39 +00:00
everest 3eaa78fc18 Update glacier-cache.sh 2022-05-02 16:42:08 +00:00
everest 9739ea56af Update glacier-query.sh 2022-05-02 16:41:49 +00:00
everest b134177b9e Update glacier-remove.sh 2022-05-02 16:41:34 +00:00
everest 4085450712 Update glacier-update.sh 2022-05-02 16:41:19 +00:00
everest b555f13f71 Update glacier-install.sh 2022-05-02 16:40:57 +00:00
everest af551c95ee Update README.md 2022-04-29 14:33:56 +00:00
everest 41191edda5 Update glacier-install.sh 2022-04-26 13:57:10 +00:00
everest 489f11e718 Update INSTALL-GLACIER.sh 2022-04-20 19:47:13 +00:00
everest 3101ad6d6e Update README.md 2022-04-20 19:44:53 +00:00
everest f65684c0fd Update glacier-query.sh 2022-04-20 19:44:06 +00:00
everest 143aa68687 Update glacier.conf 2022-04-20 19:41:19 +00:00
everest 1b446e7096 Update glacier-cache-clear.sh 2022-04-20 19:40:25 +00:00
everest 6b3ee3f6e5 Update glacier-cache-install.sh 2022-04-20 19:39:04 +00:00
everest b1ba7830a7 Update glacier-cache.sh 2022-04-20 19:36:05 +00:00
everest d64f208f1a Update glacier-update.sh 2022-04-20 19:31:16 +00:00
everest 61e3c1b9a3 Update glacier-update.sh 2022-04-20 19:30:40 +00:00
everest 4f92bbebcc Update glacier-remove.sh 2022-04-20 19:22:39 +00:00
everest b70d0070d0 Update glacier-install.sh 2022-04-20 19:13:05 +00:00
everest 40c11082bf Update README.md 2022-04-20 19:11:47 +00:00
everest 3d5c4e0cf3 Update glacier-install.sh 2022-04-20 19:10:13 +00:00
everest 6f2576170e Update glacier-install.sh 2022-04-20 19:05:26 +00:00
everest 65662a51e7 Update glacier-install.sh 2022-04-20 19:03:59 +00:00
everest 37cccd709b Update glacier-install.sh 2022-04-20 19:00:52 +00:00
everest 6c0a7ded21 Update glacier-install.sh 2022-04-20 19:00:36 +00:00
everest 1ff803c044 Update glacier-install.sh 2022-04-19 17:44:36 -04:00
everest 18cd53cbce Update glacier-install.sh 2022-04-19 21:20:32 +00:00
everest 480e8fe243 Update README.md 2022-04-13 14:34:02 +00:00
everest 7384bb3126 Update glacier-cache.sh 2022-04-12 20:46:59 +00:00
everest 4a6010ac0e Update glacier-update.sh 2022-04-12 20:46:13 +00:00
everest 6b2e9c9167 Update glacier-remove.sh 2022-04-12 20:43:51 +00:00
everest a9c50a2c69 Update glacier-install.sh 2022-04-12 20:41:35 +00:00
everest c122f5c616 Update glacier-install.sh 2022-04-12 20:39:37 +00:00
everest d3b7c2585a Update INSTALL-GLACIER.sh 2022-04-12 20:31:56 +00:00
everest a720c23349 Update INSTALL-GLACIER.sh 2022-04-12 16:44:06 +00:00
everest-linux 11ac289950 0.7rc 2022-04-12 16:42:14 +00:00
everest-linux e55679d379 0.7rc 2022-04-12 16:38:01 +00:00
everest ecae5c90ad Create WGET-INSTALL.sh 2022-04-08 16:51:33 +00:00
everest 3fc83bc766 Update glacier-update.sh 2022-04-08 16:02:42 +00:00
everest bac21d1925 Update glacier-remove.sh 2022-04-08 15:58:23 +00:00
everest 0b2d3e0e2f Update glacier-remove.sh 2022-04-05 15:08:08 +00:00
everest cdfba90742 Update glacier-cache-install.sh 2022-04-05 15:06:40 +00:00
everest de9dbf0918 Update glacier-query.sh 2022-04-05 15:05:07 +00:00
everest 66c7e0beb8 Update glacier-update.sh 2022-04-05 15:03:30 +00:00
everest c2355528c4 Update glacier-install.sh 2022-04-05 15:02:18 +00:00
everest ce6904a236 Update README.md 2022-04-05 15:00:49 +00:00
everest 241e1f543e Update UNINSTALL-GLACIER.sh 2022-04-05 13:49:32 +00:00
everest dbfa201253 Update INSTALL-GLACIER.sh 2022-04-05 13:47:19 +00:00
everest a8c1675e14 Update README.md 2022-03-31 13:10:53 +00:00
everest d545cef36d Update README.md 2022-03-30 12:45:08 +00:00
everest fea857a8e5 Update README.md 2022-03-30 12:34:29 +00:00
everest afeddfdeda Update glacier-cache-clear.sh 2022-03-29 16:19:26 +00:00
everest f27646242a Update glacier-cache-install.sh 2022-03-29 11:48:00 +00:00
everest f8ef09df29 Update glacier-cache.sh 2022-03-28 21:25:24 +00:00
everest 1c498e9553 Update INSTALL-GLACIER.sh 2022-03-28 21:21:53 +00:00
everest ea3ea66f2d Update glacier-help.sh 2022-03-28 21:18:44 +00:00
everest dfc44a179a Update README.md 2022-03-28 21:12:37 +00:00
everest b40e3e55cf Create glacier-cache-clear.sh 2022-03-28 21:11:21 +00:00
everest 0d6b9fcbc0 Create glacier-cache-install.sh 2022-03-28 21:09:56 +00:00
everest 85c3169139 Update glacier-update.sh 2022-03-28 21:04:33 +00:00
everest 5597383b6c Update glacier-install.sh 2022-03-28 21:03:37 +00:00
everest 1b7f0699e3 Create glacier-cache.sh 2022-03-28 21:03:16 +00:00
everest 3643b20cc1 Update UNINSTALL-GLACIER.sh 2022-03-28 20:53:09 +00:00
everest 5b451429ff Update INSTALL-GLACIER.sh 2022-03-28 20:50:37 +00:00
everest 99d6b8a9e4 Update README.md 2022-03-28 15:40:00 +00:00
everest 3dc076e7cd Update README.md 2022-03-28 15:39:34 +00:00
everest 89c8a66edf Update README.md 2022-03-28 15:28:14 +00:00
everest 5c3c31b70d Update glacier-remove.sh 2022-03-28 15:22:02 +00:00
everest 59cbc4c4b4 Update glacier-update.sh 2022-03-28 15:18:37 +00:00
everest 999da41b24 Update glacier-install.sh 2022-03-24 13:47:51 +00:00
everest d13c54df8d Update glacier-install.sh 2022-03-24 13:46:14 +00:00
everest 3532e3c0cd Update glacier-install.sh 2022-03-24 13:41:39 +00:00
everest 4c742b675d Update glacier-install.sh 2022-03-24 13:40:21 +00:00
everest 2f0161baac Update INSTALL-GLACIER.sh 2022-03-24 13:38:32 +00:00
everest 8d61a9b07e Update glacier-install.sh 2022-03-24 13:37:45 +00:00
everest ecfefffd87 Update README.md 2022-03-23 18:14:31 +00:00
everest 2c0dde990b Update README.md 2022-03-17 13:17:20 +00:00
everest 3668844cb6 Update README.md 2022-03-16 23:32:33 +00:00
everest 002ad51ee8 Update glacier-install.sh 2022-03-16 23:22:21 +00:00
everest 1f76be2199 Update glacier-install.sh 2022-03-16 23:20:22 +00:00
everest 544f1e00f1 Update glacier-install.sh 2022-03-16 23:18:09 +00:00
everest aab61f1bde Update glacier-install.sh 2022-03-16 23:15:22 +00:00
everest 65dc8a31ef Update README.md 2022-03-11 15:15:53 -05:00
everest 0b3d502f37 Update README.md 2022-03-11 15:15:27 -05:00
everest 3d753bcec3 Update README.md 2022-03-10 17:36:20 +00:00
everest 1ffb79e849 Update glacier-query.sh 2022-03-10 17:29:47 +00:00
everest d7bb7320a0 Update glacier-update.sh 2022-03-10 17:29:06 +00:00
everest a9f125a2ab Update glacier-remove.sh 2022-03-10 17:27:51 +00:00
everest 8a21e53041 Update glacier-install.sh 2022-03-10 17:23:12 +00:00
everest 2d466f47cb Update glacier-install.sh 2022-03-10 17:19:01 +00:00
everest 0311d859c9 Update UNINSTALL-GLACIER.sh 2022-03-10 17:09:10 +00:00
everest 554bf6724f Update UNINSTALL-GLACIER.sh 2022-03-10 16:54:52 +00:00
everest e3162699c0 Update UNINSTALL-GLACIER.sh 2022-03-09 22:42:58 +00:00
everest 5ab3b73ec0 Update UPDATE-GLACIER.sh 2022-03-09 22:42:35 +00:00
everest 25ae7889bb Update INSTALL-GLACIER.sh 2022-03-09 22:41:54 +00:00
everest f76856aa1d Create UNINSTALL-GLACIER.sh 2022-03-09 22:40:37 +00:00
everest f18c602dab Create UPDATE-GLACIER.sh 2022-03-09 22:39:53 +00:00
everest a3cc13e0ef release 0.1rc 2022-03-09 22:01:26 +00:00
everest 41b095a399 Delete glacier-install.sh 2022-03-09 22:00:09 +00:00
everest f49c641245 Add files via upload 2022-03-09 13:54:58 +00:00
everest 0c8967c637 Delete glacier-install.sh 2022-03-09 13:54:46 +00:00
everest cc1e89bf51 Add files via upload 2022-03-09 13:52:14 +00:00
everest 98406ad3b5 Delete glacier-install.sh 2022-03-09 13:49:49 +00:00
everest f23b755981 Add files via upload 2022-03-09 01:32:41 +00:00
everest cc916a54ed Delete glacier-install.sh 2022-03-09 01:32:28 +00:00
7 changed files with 329 additions and 17 deletions

No files matched your search

+55 -3
View File
@@ -1,6 +1,58 @@
![alt text](https://raw.githubusercontent.com/everest-linux/amogus3016/main/glacierlogo.png)
# Glacier
Glacier is the package manager developed for Everest Linux. It automatically fetches a tarball, unzips it, and compiles it.
Glacier is the package manager developed for Everest Linux. It fetches packages from https://github.com/everest-linux/glacier-pkgs
For Glacier to work properly, it needs the following directories to be made:
Install Glacier by pasting the following command into your terminal:
```
rm -rf /tmp/glacier && cd /tmp && git clone https://github.com/everest-linux/glacier &&
cd glacier/install && chmod +x INSTALL-GLACIER.sh && sudo ./INSTALL-GLACIER.sh || doas ./INSTALL-GLACIER.sh
```
For Glacier to work properly, you need to have both wget and tar installed.
`/usr/local/lib/glacier/packages`
Glacier depends on wget and tar for its backends. It also requires a working C compiler for source packages to work correctly. Some packages may have their own sets of dependencies. All of these are configured by default in the Everest rootfs tarball, but you may need some extra configuration to get these programs on other distros, most notably, Arch and its derivatives.
Glacier is intended to be a universal package manager, and should work on all distros, providing you have wget and tar installed. For the sake of compatibility, all scripts submitted should contain **NON DISTRO SPECIFIC COMMANDS**.
# Submitting Packages
Packages should be submitted by sending a pull request to https://github.com/everest-linux/glacier-pkgs, with your package in the proper testing repository (if its system software, world-testing, if its gpl software, galaxy-testing, etc). A maintainer will test the package to make sure it downloads correctly.
# Latest News
5/27/22 > Happy Memorial Day to everyone in the US. I've added a new file, `/etc/glacier/hooks.sh` that will define startup hooks when any Glacier script is run. It is highly recommended to keep both default hooks, and to create `/etc/make.conf`. 1.3
5/17/22 > Considering adding command line parsing
5/3/22 > Multi repository support is back! 1.2
5/3/22 > Multi-repository support might return, as I've discovered "||". 1.1 (only minor changes, such as line printing)
4/20/22 > Colored output, and proper unicode symbols. First stable Glacier release, 1.0
4/13/22 > Multi-repository support has been temporarily removed, due to incorrect error handling. 0.7.5rc
4/12/22 > Added support for multiple repositories (world, galaxy, universe, multiverse, and their testing counterparts).
4/5/22 > Added package timestamps. New package uploads will be halted until all current packages have timestamp capabilities added. To do this, add a script called (package_name).ts.sh, which should contain 2 commands:
```
touch /var/log/glacier/(package_name).timestamp
date >> /var/log/glacier/(package_name).timestamp
```
0.6rc.
3/28/22 (again) > Added package caching. This is useful if the user wishes to customize package instruction scripts before installing. 0.5rc
3/28/22 > Recovered from sickness, released 0.4rc. This update provides proper cleanup after an operation is complete. This is done by making a temporary directory that the tarball will be unpacked into. Also added the logo to README.md
3/22/22 > Sorry for a lack of updates recently, I've been sick
3/16/22 > Vim has been added to Glacier's package collection as a source package. Additionally, a couple of bugs have been ironed out. To install vim, you must be on the latest version of Glacier. This can be done by cloning this repository, marking UPDATE-GLACIER.sh as executable, and running it as root. I plan on porting more vital system software to the repositories before I release another Everest tarball. Current version: (0.3rc)
3/10/22 > Proper error handling has finally been added! If an operation fails, the package manager will quit, instead of continuing with the operation. Current version: (0.2rc)
# Roadmap
Future: musl libc and musl compiler compatability (change gcc to $CC)
Sometime within the next few months: command line parsing and multi-repository support, all neccessary packages ported
-14
View File
@@ -1,14 +0,0 @@
#!/bin/sh
# glacier-install
# Script used to fetch installation scripts and run them
echo "[ ? ] Enter package name:" && read input
echo "[ i ] Downloading source tarball for $input..."
wget https://github.com/everest-linux/glacier-pkgs/raw/main/pkgs/$input.tar.gz
echo "[ i ] Unpacking $input.tar.gz..."
tar -xvf $input.tar.gz
cd $input
chmod +x INSTALL.sh
./INSTALL.sh
rm $input.tar.gz
echo "Done."
+20
View File
@@ -0,0 +1,20 @@
#!/bin/sh
# Glacier Installation Script
# Require the script to be run as root
if [[ $(/usr/bin/id -u) -ne 0 ]]; then
echo "[ X ] Please run Glacier installation script as root."
exit
fi
mv ../scripts/glacier.conf /etc
mkdir /etc/glacier && echo "[ i ] Creating Glacier directory..."
mkdir /etc/glacier/pkginfo && echo "[ i ] Creating Glacier package list directory..."
mkdir /var/cache/glacier && echo "[ i ] Creating Glacier package cache..."
mkdir /var/log/glacier && echo "[ i ] Creating Glacier timestamp log..."
mv ../scripts/hooks.sh /etc/glacier
chmod +x ../scripts/glacier
echo "[ i ] Installing glacier..."
cd ../scripts
mv glacier /bin
echo "[ i ] Glacier has finished installing successfully."
+20
View File
@@ -0,0 +1,20 @@
#!/bin/sh
# Require the script to be run as root
if [[ $(/usr/bin/id -u) -ne 0 ]]; then
echo "[ X ] Please run Glacier uninstallation as root."
exit
fi
echo "[ ! ] It is recommended to uninstall all Glacier packages before uninstalling Glacier."
echo "[ ! ] This will prevent untracked packages from remaining on your system and possibly creating a security risk."
echo "[ ! ] To see which packages are installed on your system, run the following command:"
echo "[ ! ] ls /etc/glacier/pkginfo"
while true; do
read -p "[ ? ] Would you like to uninstall Glacier?" yn
case $yn in
[Yy]* ) rm -rf /etc/glacier && rm -rf /var/cache/glacier && rm -rf /var/log/glacier && rm /bin/glacier; break;;
[Nn]* ) exit;;
* ) echo "[ ! ] You must answer either yes or no.";;
esac
done
+206
View File
@@ -0,0 +1,206 @@
#!/bin/sh
# Glacier - A source based package manager written in POSIX sh
# (C) 2022 Everest Developers
# This program is free software: see the GNU GPL v3.0 for details.
# Preloading
source /etc/glacier/hooks.sh
while [[ $# -gt 0 ]]; do
case $1 in
-h|--help)
printf "$blue Glacier - A source based package manager written in POSIX sh $reset\n"
printf "glacier {-h --help} show this message and exit\n"
printf "glacier {--version} display the current Glacier version and exit\n"
printf "glacier {install -f} install a package\n"
printf "glacier {update -u} update a package\n"
printf "glacier {remove -x} remove a package\n"
printf "glacier {query -q} query a package\n"
printf "glacier {cache -c} cache a package\n"
printf "glacier {cache-install -ci} install a cached package\n"
printf "glacier {cache-clear -cc} clear the package cache\n"
printf "\n"
printf "This program is free software: see the GNU GPL v3.0 for details.\n"
exit 0
;;
--version)
printf "$blue Glacier v2.0 $reset\n"
exit 0
;;
install|-f)
# 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"
exit 0
;;
update|-u)
# 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"
exit 0
;;
remove|-x)
# 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"
exit 0
;;
query|-q)
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
exit 0
;;
cache|-c)
# 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."
exit 0
;;
cache-install|-ci)
# Require the script to be run as root
if [[ $(/usr/bin/id -u) -ne 0 ]]; then
echo "$red[ $error ]$reset 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."
exit 0
;;
cache-clear|-cc)
# 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."
exit 0
;;
-*|--*)
printf "$red[ $error ]$reset Unknown option, use 'glacier -h' to see usage. $reset"
exit 1
;;
esac
done
+22
View File
@@ -0,0 +1,22 @@
# Glacier configuration file
# Repositories Glacier will use
GREPO1=https://github.com/everest-linux/glacier-pkgs/raw/main/world # System Software
GREPO2=https://github.com/everest-linux/glacier-pkgs/raw/main/galaxy # GPL Only Software
GREPO3=https://github.com/everest-linux/glacier-pkgs/raw/main/universe # All Open Source Software
#GREPO4=https://github.com/everest-linux/glacier-pkgs/raw/main/multiverse # Proprietary Software
#GREPO5=https://github.com/everest-linux/glacier-pkgs/raw/main/world-testing
#GREPO6=https://github.com/everest-linux/glacier-pkgs/raw/main/galaxy-testing
#GREPO7=https://github.com/everest-linux/glacier-pkgs/raw/main/universe-testing
#GREPO8=https://github.com/everest-linux/glacier-pkgs/raw/main/multiverse-testing
# Define colors and unicode symbols to be used
export red="\033[1;31m"
export green="\033[1;32m"
export yellow="\033[1;33m"
export blue="\033[1;34m"
export reset="\033[m"
export check="\xE2\x9C\x93"
export error="\xE2\x9C\x95"
export warning="\x21"
export question="\x3F"
+6
View File
@@ -0,0 +1,6 @@
#!/bin/sh
# /etc/glacier/hooks.sh
# Hooks that will be run while calling Glacier
source /etc/glacier.conf
source /etc/make.conf