-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup_demonsaw.sh
executable file
·46 lines (32 loc) · 990 Bytes
/
setup_demonsaw.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
#!/bin/bash
# Script for downloading and updating demonsaw
mkdir -m 775 /opt/demonsaw
mv /opt/scripts/demonsaw.png /opt/demonsaw/
sudo cat <<EOF>/opt/scripts/latest_demonsaw.sh
#!/bin/bash
# this download the latest verions from stable
cd /opt
echo "Getting Latest Demonsaw"
rm -f /opt/demonsaw_nix_64.tar.gz
wget -O /opt/demonsaw_nix_64.tar.gz "https://demonsaw.com/download/demonsaw_nix_64.tar.gz"
tar -xzf /opt/demonsaw_nix_64.tar.gz -C /opt/demonsaw
chgrp -R staff /opt/demonsaw
rm -f /opt/demonsaw_nix_64.tar.gz
EOF
sudo chmod +x /opt/scripts/latest_demonsaw.sh
# Icons for demonsaw
sudo cat <<EOF>/usr/share/applications/demonsaw.desktop
#!/usr/bin/env xdg-open
[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Exec=/opt/demonsaw/demonsaw
Name=Demonsaw
Icon=/opt/demonsaw/demonsaw.png
Categories=Internet;Network;WebBrowser;
Actions=NewWindow
EOF
sudo chmod +x /usr/share/applications/demonsaw.desktop
# Download demonsaw
sudo /opt/scripts/latest_demonsaw.sh