-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
executable file
·64 lines (57 loc) · 1.73 KB
/
install.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#!/bin/sh
while true; do
read -p "Would you like to install the required Python libraries? [y|n] " yn
case $yn in
[Yy]* ) python3 -m pip install --upgrade pip;
python3 -m pip install --upgrade Pillow;
pip3 install numpy;
pip3 install pathlib;
pip3 install CairoSVG;
break;;
[Nn]* ) break;;
* ) echo "Please enter 'y' or 'n'.";;
esac
done
while true; do
read -p "Is your terminal font wide where this character, '▓' appears as a square? [y|n] " yn
case $yn in
[Yy]* ) echo "font_width: full" > icat_settings.cfg;
break;;
[Nn]* ) echo "font_width: half" > icat_settings.cfg;
break;;
* ) echo "Please enter 'y' or 'n'.";;
esac
done
while true; do
read -p "Is your terminal background light or dark? [l|d] " ld
case $ld in
[Ll]* ) echo "terminal_color: light" >> icat_settings.cfg;
break;;
[Dd]* ) echo "terminal_color: dark" >> icat_settings.cfg;
break;;
* ) echo "Please enter 'l' or 'd'.";;
esac
done
sudo cp icat.py /usr/local/bin/
sudo cp icat /usr/local/bin/
sudo cp icat_settings.cfg /usr/local/bin/
FILE=/usr/local/bin/icat.py
if test -f "$FILE"; then
echo "✅\t$FILE installed."
else
echo "❌\t$FILE could not be installed."
fi
FILE=/usr/local/bin/icat
if test -f "$FILE"; then
echo "✅\t$FILE installed."
else
echo "❌\t$FILE could not be installed."
fi
FILE=/usr/local/bin/icat_settings.cfg
if test -f "$FILE"; then
echo "✅\t$FILE installed."
else
echo "❌\t$FILE could not be installed."
fi
echo "ℹ️\tMake sure the required Python packages are installed. They are listed in README.md"
export PATH=$PATH:/usr/local/bin/icat