Compare commits
79 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
84ec22f0bd | ||
|
|
b97f0337de | ||
|
|
27ec12f373 | ||
|
|
6dbb63378e | ||
|
|
2be842a411 | ||
|
|
5688b4753d | ||
|
|
b5c28dd802 | ||
|
|
0807a13286 | ||
|
|
22e368c5fa | ||
|
|
3c4919cf0c | ||
|
|
ebe5e3930e | ||
| 9c529d1ab2 | |||
|
|
3b3d5ab369 | ||
| 8c1f892e2c | |||
| e117737527 | |||
| 69a5f0444a | |||
|
|
fd6e494314 | ||
| 4d65c0fb9e | |||
| 57505be3a2 | |||
| 0f94ed93b6 | |||
| eeac5ed390 | |||
|
|
b5faa209f2 | ||
| 1682faa871 | |||
| aa0c1ff1ac | |||
| 863d361e98 | |||
| a09bbcaa6b | |||
| 1e2e514b49 | |||
| d5122b918b | |||
| cfd90804fe | |||
| 8749f46706 | |||
|
|
5beabdbca4 | ||
|
|
faf8fe7ec8 | ||
|
|
efada985df | ||
|
|
73daf1bfbb | ||
|
|
d751e25f59 | ||
|
|
343a7c1285 | ||
|
|
a80d75b5ef | ||
|
|
f123f98fd6 | ||
|
|
0b645bd629 | ||
|
|
17cdc140bb | ||
|
|
fdc4014672 | ||
|
|
749b77dcd8 | ||
|
|
b4749dc30b | ||
|
|
975ad4fcd2 | ||
|
|
de61a35eef | ||
|
|
7caa78f3dd | ||
|
|
089fe7d668 | ||
|
|
2b062b9a3d | ||
|
|
b6aa112bd1 | ||
|
|
5fe0e37d68 | ||
|
|
e7ae67d256 | ||
|
|
34327f5d08 | ||
|
|
014a8c82a9 | ||
|
|
983f98d1a0 | ||
|
|
752ff88e76 | ||
|
|
b53666a47d | ||
|
|
49475014da | ||
|
|
2df34b663d | ||
|
|
16657923ad | ||
|
|
5336379812 | ||
|
|
683626ed85 | ||
|
|
88d836f4ec | ||
|
|
b8dbfec436 | ||
|
|
91bd0a6806 | ||
|
|
8ef2dd8bf7 | ||
|
|
8118597e51 | ||
|
|
0c8862f7b0 | ||
|
|
40ee42ce9b | ||
|
|
b2e8ec0b9e | ||
|
|
de0f023009 | ||
|
|
1af0eeccb1 | ||
|
|
c14ef72f62 | ||
|
|
797f942301 | ||
|
|
f5b99b1efe | ||
|
|
f9fe4831e5 | ||
|
|
58ad767e30 | ||
|
|
d38cf63cd1 | ||
|
|
f6742f5a3e | ||
|
|
33d1d962b7 |
57
README.md
57
README.md
@@ -1,56 +1,3 @@
|
||||

|
||||
# glacier3
|
||||
|
||||
# Glacier
|
||||
Glacier is the package manager developed for Everest Linux. It fetches packages from https://github.com/everest-linux/glacier-pkgs
|
||||
|
||||
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.
|
||||
|
||||
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/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
|
||||
Glacier3 is a testing ground for the upcoming Glacier rewrite
|
||||
|
||||
6
TODO
Normal file
6
TODO
Normal file
@@ -0,0 +1,6 @@
|
||||
### TODO LIST ###
|
||||
|
||||
#- fix messages not printing (ASAP)
|
||||
#- fix archives not downloading
|
||||
# /usr/bin/gscripts: line 37: /nano.tar.gz: No such file or directory
|
||||
#- Colors not printing
|
||||
22
glacier.conf
22
glacier.conf
@@ -1,22 +0,0 @@
|
||||
# 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"
|
||||
@@ -1,41 +0,0 @@
|
||||
#!/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 ../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..."
|
||||
chmod +x ../scripts/glacier-install.sh
|
||||
chmod +x ../scripts/glacier-remove.sh
|
||||
chmod +x ../scripts/glacier-update.sh
|
||||
chmod +x ../scripts/glacier-query.sh
|
||||
chmod +x ../scripts/glacier-cache.sh
|
||||
chmod +x ../scripts/glacier-cache-install.sh
|
||||
chmod +x ../scripts/glacier-cache-clear.sh
|
||||
chmod +x ../scripts/glacier-help.sh
|
||||
echo "[ i ] Installing glacier..."
|
||||
cd ../scripts
|
||||
cp glacier-install.sh glacier-install
|
||||
cp glacier-remove.sh glacier-remove
|
||||
cp glacier-update.sh glacier-update
|
||||
cp glacier-query.sh glacier-query
|
||||
cp glacier-cache.sh glacier-cache
|
||||
cp glacier-cache-install.sh glacier-cache-install
|
||||
cp glacier-cache-clear.sh glacier-cache-clear
|
||||
cp glacier-help.sh glacier-help
|
||||
mv glacier-install /bin
|
||||
mv glacier-remove /bin
|
||||
mv glacier-update /bin
|
||||
mv glacier-query /bin
|
||||
mv glacier-cache /bin
|
||||
mv glacier-cache-install /bin
|
||||
mv glacier-cache-clear /bin
|
||||
mv glacier-help /bin
|
||||
echo "[ i ] Glacier has finished installing successfully."
|
||||
@@ -1,20 +0,0 @@
|
||||
#!/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-install && rm /bin/glacier-update && rm /bin/glacier-remove && rm /bin/glacier-query && rm /bin/glacier-help; break;;
|
||||
[Nn]* ) exit;;
|
||||
* ) echo "[ ! ] You must answer either yes or no.";;
|
||||
esac
|
||||
done
|
||||
@@ -1,34 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Require the script to be run as root
|
||||
if [[ $(/usr/bin/id -u) -ne 0 ]]; then
|
||||
echo "[ X ] Please run Glacier update script as root."
|
||||
exit
|
||||
fi
|
||||
|
||||
echo "[ i ] Removing outdated binaries..."
|
||||
rm /bin/glacier-install
|
||||
rm /bin/glacier-update
|
||||
rm /bin/glacier-remove
|
||||
rm /bin/glacier-query
|
||||
rm /bin/glacier-help
|
||||
echo "[ i ] Marking new binaries as executable..."
|
||||
cd ../scripts
|
||||
chmod +x glacier-install.sh
|
||||
chmod +x glacier-update.sh
|
||||
chmod +x glacier-remove.sh
|
||||
chmod +x glacier-query.sh
|
||||
chmod +x glacier-help.sh
|
||||
echo "[ i ] Preparing to install new binaries..."
|
||||
cp glacier-install.sh glacier-install
|
||||
cp glacier-update.sh glacier-update
|
||||
cp glacier-remove.sh glacier-remove
|
||||
cp glacier-query.sh glacier-query
|
||||
cp glacier-help.sh glacier-help
|
||||
echo "[ i ] Installing new binaries..."
|
||||
mv glacier-install /bin
|
||||
mv glacier-update /bin
|
||||
mv glacier-remove /bin
|
||||
mv glacier-query /bin
|
||||
mv glacier-help /bin
|
||||
echo "[ i ] Glacier was successfully updated to the latest version."
|
||||
@@ -1,3 +0,0 @@
|
||||
#!/bin.sh
|
||||
|
||||
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
|
||||
24
install/install.sh
Executable file
24
install/install.sh
Executable file
@@ -0,0 +1,24 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [[ $(/usr/bin/id -u) -ne 0 ]]; then
|
||||
printf " [ * ] Installation Script must be run as root.\n"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Create directories
|
||||
mkdir /etc/glacier
|
||||
mkdir /etc/glacier/pkginfo
|
||||
mkdir /var/log/glacier
|
||||
mkdir /var/cache/glacier
|
||||
|
||||
# Install Scripts
|
||||
cd ../src
|
||||
chmod +x *
|
||||
cp glacier /usr/bin/glacier
|
||||
cp glacier.conf /etc/glacier.conf
|
||||
cp glacier_release /etc/glacier/glacier_release
|
||||
cp gscripts /usr/bin/gscripts
|
||||
cp messages /etc/glacier/messages
|
||||
cp hooks /etc/glacier/hooks
|
||||
|
||||
printf "done\n"
|
||||
@@ -1,17 +0,0 @@
|
||||
#!/bin/sh
|
||||
# glacier-cache-clear
|
||||
# Script used to clear Glacier's cache
|
||||
|
||||
# Glacier preloading
|
||||
|
||||
source /etc/glacier.conf
|
||||
|
||||
# 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."
|
||||
@@ -1,37 +0,0 @@
|
||||
#!/bin/sh
|
||||
# glacier-cache-install
|
||||
# Script used to install cached packages
|
||||
|
||||
# Glacier preloading
|
||||
|
||||
source /etc/glacier.conf
|
||||
|
||||
# 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."
|
||||
@@ -1,23 +0,0 @@
|
||||
#!/bin/sh
|
||||
# glacier-cache
|
||||
# Script used to download a package and cache it
|
||||
|
||||
# Glacier preloading
|
||||
|
||||
source /etc/glacier.conf
|
||||
|
||||
# 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."
|
||||
@@ -1,19 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
echo "Glacier Package Manager v1.2"
|
||||
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 <package> 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."
|
||||
@@ -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.conf
|
||||
|
||||
# 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"
|
||||
@@ -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
|
||||
@@ -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.conf
|
||||
|
||||
# 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"
|
||||
@@ -1,39 +0,0 @@
|
||||
#!/bin/sh
|
||||
# glacier-update
|
||||
# Script used to update packages
|
||||
|
||||
# Glacier preloading
|
||||
|
||||
source /etc/glacier.conf
|
||||
|
||||
# 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"
|
||||
9
src/INSTALL_LOCATIONS
Normal file
9
src/INSTALL_LOCATIONS
Normal file
@@ -0,0 +1,9 @@
|
||||
=== Executables ===
|
||||
/usr/bin/glacier
|
||||
/usr/bin/gscripts
|
||||
|
||||
=== Settings/Other files ===
|
||||
/etc/glacier/glacier_release
|
||||
/etc/glacier/hooks
|
||||
/etc/glacier.conf
|
||||
/etc/make.conf
|
||||
289
src/glacier
Executable file
289
src/glacier
Executable file
@@ -0,0 +1,289 @@
|
||||
#!/bin/sh
|
||||
# Glacier - A simple package management system written in POSIX sh
|
||||
# Copyright (C) 2022 Everest Linux Development Group
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# Preloading
|
||||
/usr/bin/gscripts preload
|
||||
source $(pwd)/messages # this is here for the sole purpose of testing
|
||||
source /etc/glacier/messages
|
||||
input = ${2}
|
||||
|
||||
# Main Script
|
||||
while [[ $# -gt 0 ]]; do
|
||||
case $1 in
|
||||
-h|--help)
|
||||
printf "$blue [ * ] Glacier - Manage packages on the system [ * ] $reset\n"
|
||||
printf "$blue=== Information ====================================================================================$reset\n"
|
||||
printf "$ glacier {-h --help} show this message and exit\n"
|
||||
printf "$ glacier {--version} display the current Glacier version and exit\n"
|
||||
printf "$blue=== Package Operations =============================================================================$reset\n"
|
||||
printf "# glacier {install -f} install a package to the system\n"
|
||||
printf "# glacier {update -u} update an installed package\n"
|
||||
printf "# glacier {remove -x} remove an installed package\n"
|
||||
printf "$ glacier {query -q} query the information of an installed package\n"
|
||||
printf "# glacier {cache -c} cache a package from the repositories\n"
|
||||
printf "# glacier {cache-install -ci} install a cached package\n"
|
||||
printf "# glacier {cache-clear -cc} clear the package cache\n"
|
||||
printf "$blue=== Debugging ======================================================================================$reset\n"
|
||||
printf "$ glacier {--showDebugInfo} show debugging info\n"
|
||||
printf "$blue=== Licensing ======================================================================================$reset\n"
|
||||
printf "This program is freely distributable under the terms of the\n"
|
||||
printf "GNU General Public License version 3 or later.\n"
|
||||
printf "You should have recieved a copy of the GNU General Public License\n"
|
||||
printf "along with this program. If not, see <https://www.gnu.org/licenses/>.\n"
|
||||
printf "$blue======================================================================================================\n"
|
||||
exit 0
|
||||
;;
|
||||
--version)
|
||||
printf "$blue Glacier v$GLACIER_RELEASE $reset\n"
|
||||
exit 0
|
||||
;;
|
||||
install|-f)
|
||||
# Require script to be run as root
|
||||
if [[ $(/usr/bin/id -u) -ne 0 ]]; then
|
||||
echo $GLACIER_ERROR_NO_ROOT
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo $GLACIER_STATUS_INSTALLING
|
||||
/usr/bin/gscripts download
|
||||
if [ "$?" != "0" ]; then
|
||||
echo $GLACIER_ERROR_DOES_NOT_EXIST
|
||||
exit 1
|
||||
fi
|
||||
echo $GLACIER_STATUS_INTEGRITY_CHECK
|
||||
mkdir $2 && mv $2.tar.gz $2 && cd $2
|
||||
/usr/bin/gscripts integrity-check
|
||||
if [ "$?" != "0" ]; then
|
||||
exit 1
|
||||
fi
|
||||
echo $GLACIER_STATUS_UNPACKING
|
||||
tar -xvf $2.tar.gz
|
||||
if [ "$?" != "0" ]; then
|
||||
echo $GLACIER_ERROR_CANNOT_UNPACK
|
||||
exit 1
|
||||
fi
|
||||
chmod +x INSTALL.sh
|
||||
chmod +x $2.ts.sh
|
||||
echo $GLACIER_STATUS_EXECUTING
|
||||
./INSTALL.sh
|
||||
if [ "$?" != "0" ]; then
|
||||
echo $GLACIER_ERROR_INSTRUCTIONS_CANNOT_EXECUTE
|
||||
exit 1
|
||||
fi
|
||||
./$2.ts.sh
|
||||
/usr/bin/gscripts post-install
|
||||
echo $GLACIER_SUCCESS
|
||||
exit 0
|
||||
;;
|
||||
update|-u)
|
||||
# Require script to be run as root
|
||||
if [[ $(/usr/bin/id -u) -ne 0 ]]; then
|
||||
echo $GLACIER_ERROR_NO_ROOT
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo $GLACIER_STATUS_UPDATING
|
||||
/usr/bin/gscripts download
|
||||
if [ "$?" != "0" ]; then
|
||||
echo $GLACIER_ERROR_DOES_NOT_EXIST
|
||||
exit 1
|
||||
fi
|
||||
echo $GLACIER_STATUS_INTEGRITY_CHECK
|
||||
mkdir $2 && mv $2.tar.gz $2 && cd $2
|
||||
/usr/bin/gscripts integrity-check
|
||||
if [ "$?" != "0" ]; then
|
||||
exit 1
|
||||
fi
|
||||
echo $GLACIER_STATUS_UNPACKING
|
||||
tar -xvf $2.tar.gz
|
||||
if [ "$?" != "0" ]; then
|
||||
echo $GLACIER_ERROR_CANNOT_UNPACK
|
||||
exit 1
|
||||
fi
|
||||
chmod +x UPDATE.sh
|
||||
chmod +x $2.ts.sh
|
||||
echo $GLACIER_STATUS_EXECUTING
|
||||
./UPDATE.sh
|
||||
if [ "$?" != "0" ]; then
|
||||
echo $GLACIER_ERROR_INSTRUCTIONS_CANNOT_EXECUTE
|
||||
exit 1
|
||||
fi
|
||||
./$2.ts.sh
|
||||
/usr/bin/gscripts post-install
|
||||
echo $GLACIER_SUCCESS
|
||||
exit 0
|
||||
;;
|
||||
remove|-x)
|
||||
# Require script to be run as root
|
||||
if [[ $(/usr/bin/id -u) -ne 0 ]]; then
|
||||
echo $GLACIER_ERROR_NO_ROOT
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo $GLACIER_STATUS_REMOVING
|
||||
/usr/bin/gscripts download
|
||||
if [ "$?" != "0" ]; then
|
||||
echo $GLACIER_ERROR_DOES_NOT_EXIST
|
||||
exit 1
|
||||
fi
|
||||
echo $GLACIER_STATUS_INTEGRITY_CHECK
|
||||
mkdir $2 && mv $2.tar.gz $2 && cd $2
|
||||
/usr/bin/gscripts integrity-check
|
||||
if [ "$?" != "0" ]; then
|
||||
exit 1
|
||||
fi
|
||||
echo $GLACIER_STATUS_UNPACKING
|
||||
tar -xvf $2.tar.gz
|
||||
if [ "$?" != "0" ]; then
|
||||
echo $GLACIER_ERROR_CANNOT_UNPACK
|
||||
exit 1
|
||||
fi
|
||||
chmod +x REMOVE.sh
|
||||
chmod +x $2.ts.sh
|
||||
echo $GLACIER_STATUS_EXECUTING
|
||||
./REMOVE.sh
|
||||
if [ "$?" != "0" ]; then
|
||||
echo $GLACIER_ERROR_INSTRUCTIONS_CANNOT_EXECUTE
|
||||
exit 1
|
||||
fi
|
||||
./$2.ts.sh
|
||||
/usr/bin/gscripts post-install
|
||||
echo $GLACIER_SUCCESS
|
||||
exit 0
|
||||
;;
|
||||
query|-q)
|
||||
cat /etc/glacier/pkginfo/$2-pkginfo.json
|
||||
cat /var/log/glacier/$2.timestamp
|
||||
if [ "$?" != "0" ]; then
|
||||
echo $GLACIER_ERROR_NOT_INSTALLED
|
||||
exit 1
|
||||
fi
|
||||
exit 0
|
||||
;;
|
||||
cache|-c)
|
||||
if [[ $(/usr/bin/id -u) -ne 0 ]]; then
|
||||
echo $GLACIER_ERROR_NO_ROOT
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo $GLACIER_STATUS_CACHING
|
||||
/usr/bin/gscripts download
|
||||
if [ "$?" != "0" ]; then
|
||||
echo $GLACIER_ERROR_DOES_NOT_EXIST
|
||||
exit 1
|
||||
fi
|
||||
echo $GLACIER_STATUS_INTEGRITY_CHECK
|
||||
mv $2.tar.gz /var/cache/glacier && cd /var/cache/glacier
|
||||
/usr/bin/gscripts integrity-check
|
||||
if [ "$?" != "0" ]; then
|
||||
exit 1
|
||||
fi
|
||||
echo $GLACIER_SUCCESS
|
||||
exit 0
|
||||
;;
|
||||
cache-install|-ci)
|
||||
if [[ $(usr/bin/id -u) -ne 0 ]]; then
|
||||
echo $GLACIER_ERROR_NO_ROOT
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo $GLACIER_STATUS_INSTALLING
|
||||
cd /var/cache/glacier && cp $2.tar.gz /tmp && cd /tmp
|
||||
if [ "$?" != "0" ]; then
|
||||
echo $GLACIER_ERROR_NOT_IN_CACHE
|
||||
exit 1
|
||||
fi
|
||||
echo $GLACIER_STATUS_UNPACKING
|
||||
mkdir $2 && mv $2.tar.gz $2 && cd $2
|
||||
tar -xvf $2.tar.gz
|
||||
if [ "$?" != "0" ]; then
|
||||
echo $GLACIER_ERROR_CANNOT_UNPACK
|
||||
exit 1
|
||||
fi
|
||||
echo $GLACIER_STATUS_EXECUTING
|
||||
chmod +x INSTALL.sh
|
||||
chmod +x $2.ts.sh
|
||||
./INSTALL.sh
|
||||
if [ "$!" != "0" ]; then
|
||||
echo $GLACIER_ERROR_INSTRUCTIONS_CANNOT_EXECUTE
|
||||
exit 1
|
||||
fi
|
||||
./$2.ts.sh
|
||||
/usr/bin/gscripts post-install
|
||||
echo $GLACIER_SUCCESS
|
||||
exit 0
|
||||
;;
|
||||
cache-clear|-cc)
|
||||
if [[ $(/usr/bin/id -u) -ne 0 ]]; then
|
||||
echo $GLACIER_ERROR_NO_ROOT
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo $GLACIER_STATUS_CLEARING
|
||||
cd /var/cache/glacier && rm -rf *
|
||||
echo $GLACIER_SUCCESS
|
||||
exit 0
|
||||
;;
|
||||
--showDebugInfo)
|
||||
printf "$blue Glacier v$GLACIER_RELEASE $reset\n"
|
||||
printf ">> Checking for a viable download backend...\n"
|
||||
whereis wget
|
||||
whereis curl
|
||||
whereis aria2c
|
||||
printf ">> Checking which download backend is in use...\n"
|
||||
echo $GLACIER_DOWNLOAD_BACKEND
|
||||
printf ">> Checking if all Glacier directories and files are present...\n"
|
||||
ls /etc | grep glacier
|
||||
ls /etc/glacier
|
||||
whereis make.conf
|
||||
printf ">> If any files are missing, especially make.conf, Glacier will behave abnormally.\n"
|
||||
printf ">> Checking if unicode symbols and colors display properly...\n"
|
||||
printf "(NOTE): If you use a custom colorscheme, colors may vary.\n"
|
||||
printf " For instance, the Dracula colorscheme turns blue into purple.\n"
|
||||
printf "$check\n"
|
||||
printf "$error\n"
|
||||
printf "$warning\n"
|
||||
printf "$question\n"
|
||||
printf "$red Red.$reset\n"
|
||||
printf "$green Green.$reset\n"
|
||||
printf "$yellow Yellow.$reset\n"
|
||||
printf "$blue Blue.$reset\n"
|
||||
printf ">> Checking repositories...\n"
|
||||
echo $GREPO1
|
||||
echo $GREPO2
|
||||
echo $GREPO3
|
||||
echo $GREPO4
|
||||
echo $GREPO5
|
||||
echo $GREPO6
|
||||
echo $GREPO7
|
||||
echo $GREPO8
|
||||
printf ">> Debug information has been gathered.\n"
|
||||
printf ">> Run 'glacier --showDebugInfo > glacier.debug' to save this information to a file.\n"
|
||||
exit 0
|
||||
;;
|
||||
-*|--*)
|
||||
echo $GLACIER_ERROR_NO_SUCH_OPTION
|
||||
exit 1
|
||||
;;
|
||||
*)
|
||||
echo $GLACIER_ERROR_NO_SUCH_OPTION
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
echo $GLACIER_ERROR_NO_SUCH_OPTION
|
||||
exit 1
|
||||
63
src/glacier.conf
Executable file
63
src/glacier.conf
Executable file
@@ -0,0 +1,63 @@
|
||||
#
|
||||
# /etc/glacier.conf
|
||||
# The settings stored in this file will be loaded when Glacier is called
|
||||
# For more information on each of these options, see https://git.everest
|
||||
#
|
||||
|
||||
# Repositories Glacier will use
|
||||
|
||||
#[world]
|
||||
export GREPO1="https://git.everestlinux.org/EverestLinux/glacier-pkgs/raw/branch/main/world" # System Software
|
||||
|
||||
#[galaxy]
|
||||
export GREPO2="https://git.everestlinux.org/EverestLinux/glacier-pkgs/raw/branch/main/galaxy" # GPL Only Software
|
||||
|
||||
#[universe]
|
||||
export GREPO3="https://git.everestlinux.org/EverestLinux/glacier-pkgs/raw/branch/main/universe" # All Open Source Software
|
||||
|
||||
#[multiverse]
|
||||
#export GREPO4=https://git.everestlinux.org/EverestLinux/glacier-pkgs/raw/branch/main/multiverse # Proprietary Software
|
||||
|
||||
#[world-testing]
|
||||
#export GREPO5=https://git.everestlinux.org/EverestLinux/glacier-pkgs/raw/branch/main/world-testing
|
||||
|
||||
#[galaxy-testing]
|
||||
#export GREPO6=https://git.everestlinux.org/EverestLinux/glacier-pkgs/raw/branch/main/galaxy-testing
|
||||
|
||||
#[universe-testing]
|
||||
#export GREPO7=https://git.everestlinux.org/EverestLinux/glacier-pkgs/raw/branch/main/universe-testing
|
||||
|
||||
#[multiverse-testing]
|
||||
#export GREPO8=https://git.everestlinux.org/EverestLinux/glacier-pkgs/raw/branch/main/multiverse-testing
|
||||
|
||||
# Checksum locations
|
||||
|
||||
export WORLD_SUM="https://git.everestlinux.org/EverestLinux/glacier-pkgs/src/branch/main/world"
|
||||
export GALAXY_SUM="https://git.everestlinux.org/EverestLinux/glacier-pkgs/src/branch/main/galaxy"
|
||||
export UNIEVRSE_SUM="https://git.everestlinux.org/EverestLinux/glacier-pkgs/src/branch/main/universe"
|
||||
export MULTIVERSE_SUM="https://git.everestlinux.org/EverestLinux/glacier-pkgs/src/branch/main/multiverse"
|
||||
export WORLD_TESTING_SUM="https://git.everestlinux.org/EverestLinux/glacier-pkgs/src/branch/main/world-testing"
|
||||
export GALAXY_TESTING_SUM="https://git.everestlinux.org/EverestLinux/glacier-pkgs/src/branch/main/galaxy-testing"
|
||||
export UNIVERSE_TESTING_SUM="https://git.everestlinux.org/EverestLinux/glacier-pkgs/src/branch/main/universe-testing"
|
||||
export MULTIVERSE_TESTING_SUM="https://git.everestlinux.org/EverestLinux/glacier-pkgs/src/branch/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"
|
||||
|
||||
# Which backend Glacier will use to download files
|
||||
# Selecting more than one backend will cause breakage
|
||||
export GLACIER_DOWNLOAD_BACKEND="wget --quiet --show-progress"
|
||||
#export GLACIER_DOWNLOAD_BACKEND="curl --output $input.tar.gz"
|
||||
#export GLACIER_DOWNLOAD_BACKEND="aria2c"
|
||||
|
||||
#
|
||||
# end /etc/glacier.conf
|
||||
#
|
||||
3
src/glacier_release
Executable file
3
src/glacier_release
Executable file
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
export GLACIER_RELEASE="3.0.0 "
|
||||
58
src/gscripts
Executable file
58
src/gscripts
Executable file
@@ -0,0 +1,58 @@
|
||||
#!/bin/sh
|
||||
# gscripts - Scripts for Glacier operations
|
||||
|
||||
source /etc/glacier.conf
|
||||
|
||||
while [[ $# -gt 0 ]]; do
|
||||
case $1 in
|
||||
help)
|
||||
printf "gscripts - backend for many Glacier functionalities since v3\n"
|
||||
printf "gscripts {help} show this message\n"
|
||||
printf "gscripts {integrity-check} verify package integrity\n"
|
||||
printf "gscripts {download} download a package\n"
|
||||
printf "gscripts {post-install} run post installation cleanup hooks\n"
|
||||
printf "\n"
|
||||
printf "this program can be distributed under the terms of the GNU General\n"
|
||||
printf "Public License version 3 or higher\n"
|
||||
exit 0
|
||||
;;
|
||||
preload)
|
||||
/etc/glacier/hooks
|
||||
if [ "$?" != "0" ]; then
|
||||
exit 1
|
||||
fi
|
||||
exit 0
|
||||
;;
|
||||
integrity-check)
|
||||
$GLACIER_DOWNLOAD_BACKEND $WORLD_SUM/$input.checksum || $GLACIER_DOWNLOAD_BACKEND $GALAXY_SUM/$input.checksum || $GLACIER_DOWNLOAD_BACKEND $UNIVERSE_SUM/$input.checksum || $GLACIER_DOWNLOAD_BACKEND $MULTIVERSE_SUM/$input.checksum || $GLACIER_DOWNLOAD_BACKEND $WORLD_TESTING_SUM/$input.checksum || $GLACIER_DOWNLOAD_BACKEND $GALAXY_TESTING_SUM/$input.checksum || $GLACIER_DOWNLOAD_BACKEND $UNIVERSE_TESTING_SUM/$input.checksum || $GLACIER_DOWNLOAD_BACKEND $MULTIVERSE_TESTING_SUM/$input.checksum
|
||||
exit 0
|
||||
|
||||
LOCAL_SUM=$(sha256sum $input.tar.gz)
|
||||
|
||||
if [ $input.checksum = $LOCAL_SUM ]; then
|
||||
printf "$green [ $check ]$reset Integrity check passed.\n"
|
||||
rm $input.checksum
|
||||
exit 0
|
||||
else
|
||||
printf "$red [ $error ]$reset Integrity check failed.\n"
|
||||
rm $input.checksum
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
download)
|
||||
$GLACIER_DOWNLOAD_BACKEND $GREPO1/$input.tar.gz || $GLACIER_DOWNLOAD_BACKEND $GREPO2/$input.tar.gz || $GLACIER_DOWNLOAD_BACKEND $GREPO3/$input.tar.gz || $GLACIER_DOWNLOAD_BACKEND $GREPO4/$input.tar.gz || $GLACIER_DOWNLOAD_BACKEND $GREPO5/$input.tar.gz || $GLACIER_DOWNLOAD_BACKEND $GREPO6/$input.tar.gz || $GLACIER_DOWNLOAD_BACKEND $GREPO7/$input.tar.gz || $GLACIER_DOWNLOAD_BACKEND $GREPO8/$input.tar.gz
|
||||
exit 0
|
||||
;;
|
||||
post-install)
|
||||
mv -vf -- $input-pkginfo.json /etc/glacier/pkginfo || printf "error in subprocess /usr/bin/gscripts: could not stat $input-pkginfo.json\n" && exit 1
|
||||
cd ..
|
||||
rm -rf $input || printf "error in subprocess /usr/bin/gscripts: could not remove package source\n" && exit 1
|
||||
;;
|
||||
-*|--*)
|
||||
printf "gscripts - no valid option was passed, see 'help' for details\n"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
printf "gscripts - no option was passed, see 'help' for details\n"
|
||||
6
src/hooks
Executable file
6
src/hooks
Executable file
@@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
# Glacier Preloading Hooks
|
||||
|
||||
source /etc/make.conf
|
||||
source /etc/glacier.conf
|
||||
source /etc/glacier/glacier_release
|
||||
8
src/hooks.sh
Executable file
8
src/hooks.sh
Executable file
@@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
# This file is meant to maintain legacy support.
|
||||
|
||||
printf "This package uses the legacy hooks file (/etc/glacier/hooks.sh).\n"
|
||||
printf ">>> This is not an error. <<< There is no manual intervention needed.\n"
|
||||
printf "If you are the maintainer of this package, please update your usrbuild.sh, usrupdate.sh, and usrremove.sh accordingly.\n"
|
||||
|
||||
source /etc/glacier/hooks && /etc/glacier/hooks
|
||||
40
src/make.conf
Normal file
40
src/make.conf
Normal file
@@ -0,0 +1,40 @@
|
||||
#
|
||||
# make.conf - optimizations and flags for make
|
||||
#
|
||||
|
||||
# Number of parallel makejobs. Change this number to your CPUs cores + threads.
|
||||
# Example: 6 cores + 6 threads = 12
|
||||
MAKEFLAGS="-j1"
|
||||
|
||||
# Build and compile flags for C and C++ programs.
|
||||
# Disable these if packages are breaking.
|
||||
# Using too many optimizations may break packages.
|
||||
CFLAGS="-02"
|
||||
CXXFLAGS="${CFLAGS}"
|
||||
|
||||
# Flag which treats all warnings as errors.
|
||||
# Not recommended, as many packages with large codebases will refuse to compile.
|
||||
#CFLAGS="-Werror"
|
||||
|
||||
# Prefix for installed packages. Most packages will follow this.
|
||||
# Some packages may have their own prefix. For instance, appimages will install to /usr/share/appimages, and be symlinked to /bin.
|
||||
PREFIX="/usr"
|
||||
#PREFIX="/usr/local"
|
||||
|
||||
# CPU architecture. Most users will use x86_64.
|
||||
# This setting should manually set itself. If it doesn't, set it manually.
|
||||
# Note that some packages will not compile for other architectures.
|
||||
# Example: ARCH="x86_64"
|
||||
ARCH="${MACHTYPE}"
|
||||
|
||||
# Triplet for the target system.
|
||||
# This should only be used if cross compiling.
|
||||
# For reference, Everest's triplet is x86_64-linux-musl.
|
||||
#TARGET="x86_64-linux-musl"
|
||||
#TARGET="x86_64-pc-linux-gnu"
|
||||
#TARGET="i386-linux-musl"
|
||||
#TARGET="i386-pc-linux-gnu"
|
||||
|
||||
#
|
||||
# end make.conf
|
||||
#
|
||||
24
src/messages
Executable file
24
src/messages
Executable file
@@ -0,0 +1,24 @@
|
||||
#!/bin/sh
|
||||
# Glacier messages storage
|
||||
|
||||
source /etc/glacier.conf
|
||||
|
||||
# Errors
|
||||
export GLACIER_ERROR_NO_ROOT=$(printf "$red [ $error ]$reset Please run Glacier as root.\n")
|
||||
export GLACIER_ERROR_DOES_NOT_EXIST=$(printf "$red [ $error ]$reset Package $input either does not exist, or is in a repository that is not enabled.\n")
|
||||
export GLACIER_ERROR_CANNOT_UNPACK=$(printf "$red [ $error ]$reset Package archive cannot be unpacked.\n")
|
||||
export GLACIER_ERROR_INSTRUCTIONS_CANNOT_EXECUTE=$(printf "$red [ $error ]$reset Instructions were either unable to execute, or encountered an error while executing.\n")
|
||||
export GLACIER_ERROR_NO_SUCH_OPTION=$(printf "$red [ $error ]$reset Unknown option, see 'glacier -h' for usage.\n")
|
||||
|
||||
# Status
|
||||
export GLACIER_STATUS_INSTALLING=$(printf "$blue [ i ]$reset Installing $input...\n")
|
||||
export GLACIER_STATUS_UPDATING=$(printf "$blue [ i ]$reset Updating $input...\n")
|
||||
export GLACIER_STATUS_REMOVING=$(printf "$blue [ i ]$reset Removing $input...\n")
|
||||
export GLACIER_STATUS_CACHING=$(printf "$blue [ i ]$reset Caching $input...\n")
|
||||
export GLACIER_STATUS_UNPACKING=$(printf "$blue [ i ]$reset Unpacking $input.tar.gz...\n")
|
||||
export GLACIER_STATUS_INTEGRITY_CHECK=$(printf "$blue [ i ]$reset Verifying integrity of package...\n")
|
||||
export GLACIER_STATUS_EXECUTING=$(printf "$blue [ i ]$reset Executing instructions...\n")
|
||||
export GLACIER_WHICH_PKG=$(printf "$blue [ $question ]$reset Enter package name: ")
|
||||
|
||||
# Success
|
||||
export GLACIER_SUCCESS=$(printf "$green [ $check ]$reset Operation finished successfully.\n")
|
||||
Reference in New Issue
Block a user