-
Notifications
You must be signed in to change notification settings - Fork 40
/
Copy pathinstall.sh
executable file
·52 lines (41 loc) · 1.54 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
#!/bin/bash
# Install system dependencies
if [[ $# -eq 0 ]]
then
echo "Usage: ./install.sh install_dir"
echo "E.g. ./install.sh /opt/coindicator"
exit 1
fi
args=("$@")
echo Installing to ${args[0]}
sudo apt-get install python3-venv python3-setuptools-scm python3-wheel python3-gi gir1.2-gtk-3.0 gir1.2-appindicator3-0.1 python3-pip patchelf -y
# some users report requiring libgirepository1.0-dev libdbus-1-dev, libcairo2-dev, build-essential
# some report having to install a newer version of cmake
# sudo apt purge --auto-remove cmake
# wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | sudo tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null
# sudo apt-add-repository 'deb https://apt.kitware.com/ubuntu/ focal main'
# sudo apt update
# sudo apt install cmake
# Install python packages
sudo mkdir ${args[0]} 2>/dev/null
sudo python3 -m venv ${args[0]}/venv
source ${args[0]}/venv/bin/activate
sudo -H -E env PATH=$PATH pip3 install -U coindicator
# Install shortcut
cat > /tmp/coindicator.desktop << EOL
[Desktop Entry]
Name=Coindicator
GenericName=Cryptocoin price ticker
Comment=Keep track of the cryptocoin prices on various exchanges
Terminal=false
Type=Application
Categories=Utility;
Keywords=crypto;coin;ticker;price;exchange;
StartupNotify=false
Path=${args[0]}/venv/bin
Exec=coindicator
Icon=/tmp/logo_248px.png
X-GNOME-UsesNotifications=true
EOL
cp ./src/coin/resources/logo_248px.png /tmp
desktop-file-install --dir=$HOME/.local/share/applications /tmp/coindicator.desktop