-
Notifications
You must be signed in to change notification settings - Fork 0
/
install
51 lines (49 loc) · 2 KB
/
install
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
43
44
45
46
47
48
49
50
51
#!/bin/bash
echo "Welcome to ROM Unzipper by LiteApplication"
wd=$(pwd)
echo "Checking root access..."
if [[ $EUID -ne 0 ]]; then
echo " This script must be run as root" 1>&2
exit 1
fi
echo "Checking dependances..."
if ! command -v python3 &>/dev/null; then
echo " Installing python3... Please wait, it may take a while"
sudo apt-get install python3 python -qq > /dev/null || echo "python3 is not installed, please install it"
fi
if ! dpkg --list | grep " python3-psutil" &>/dev/null; then
echo " Installing psutil... Please wait, it may take a while"
sudo apt-get install python3-psutil -qq > /dev/null || echo "python3-psutil is not installed, please install it"
fi
if ! command -v python2 &>/dev/null; then
echo " Installing python2... Please wait, it may take a while"
sudo apt-get install python2 python -qq > /dev/null || echo "python2 is not installed, please install it"
fi
if ! command -v git &>/dev/null; then
echo " Installing git... Please wait, it may take a while"
sudo apt-get install git -qq > /dev/null || echo "git is not installed, please install it"
fi
if ! dpkg --list | grep " brotli " &>/dev/null; then
echo " Installing brotli... Please wait, it may take a while"
sudo apt-get install brotli -qq > /dev/null || echo "brotli is not installed, please install it"
fi
echo "Downloading program..."
mkdir files
cd files
git clone https://github.com/LiteApplication/rom-unzip.git --quiet
echo "Removing old files..."
rm -fr /bin/rom-unzip
rm -fr /etc/liteapplication/rom-unzip
echo "Installing program..."
mkdir -p /etc/liteapplication/rom-unzip
cd rom-unzip
mv src/* /etc/liteapplication/rom-unzip/
cd ..
ln -s /etc/liteapplication/rom-unzip/rom-unzip.py /bin/rom-unzip
chmod 755 -R /etc/liteapplication/rom-unzip/
echo "Cleaning temporary files..."
cd ..
rm -fr files
echo "Successfully installed rom-unzip version " $( curl -s https://raw.githubusercontent.com/LiteApplication/rom-unzip/master/src/version)
echo "run 'sudo rom-unzip -V' to start. "
exit 0