-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCompressor.sh
42 lines (40 loc) · 1.02 KB
/
Compressor.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/bash
if ! command -v chdman >> /dev/null; then
echo "CHDMAN not found! Downloading and installing!"
echo "Downloading needed packages"
pkg install build-essential git ninja -y
echo "Downloading source"
git clone https://github.com/CharlesThobe/chdman.git
cd ./chdman || exit
else
cd ./chdman || exit
git pull
fi
echo "Compiling"
if [ -d "build" ]; then
rm -rf build
fi
mkdir build || exit
cd build || exit
cmake -G Ninja .. && ninja
echo "Moving chdman to $PATH and making it executable"
cp ./chdman "$PATH"/chdman
chmod +x "$PATH"/chdman
cd "$(dirname "$0")" || exit
if ! command -v maxcso >> /dev/null; then
echo "Maxcso not found! Downloading and installing!"
echo "Downloading needed packages"
pkg install binutils build-essential git liblz4 libuv -y
echo "Downloading source"
git clone https://github.com/unknownbrackets/maxcso.git
cd ./maxcso || exit
else
cd ./maxcso
git pull
fi
echo "Compiling"
make
echo "Moving Maxcso to $PATH and making it executable"
cp ./maxcso "$PATH"/maxcso
chmod +x "$PATH"/maxcso
cd "$(dirname "$0")"