-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmake.sh
More file actions
executable file
·42 lines (41 loc) · 1.32 KB
/
Copy pathmake.sh
File metadata and controls
executable file
·42 lines (41 loc) · 1.32 KB
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
echo "installing the game..."
make
make clean
echo -e "[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Name=Chain
Exec= gnome-terminal -- /bin/bash -c \"nohup ~/.chainreaction/chain --noblock --TTF_PATH ~/.chainreaction/font.ttf --SAVED_GAME_PATH ~/.chainreaction/ > /dev/null 2> /dev/null\"
StartupNotify = true" > start.desktop
chmod +x start.desktop
if [ -d ~/.local/share/applications ]
then
echo "copying desktop file..."
cp start.desktop ~/.local/share/applications/start.desktop
fi
echo -n "create a shortcut for game? [y/n]: "
read answer
if [ $answer == "y" ]
then
echo "creating shortcut..."
if [ -d ~/.local/bin ]
then
echo "#! /bin/bash" >> ~/.local/bin/chain
echo "" >> ~/.local/bin/chain
echo "~/.chainreaction/chain --TTF_PATH ~/.chainreaction/font.ttf --SAVED_GAME_PATH ~/.chainreaction/ \$*" >> ~/.local/bin/chain
chmod +x ~/.local/bin/chain
else
echo "#! /bin/bash" >> /usr/bin/chain
echo "" >> /usr/bin/chain
echo "~/.chainreaction/chain --TTF_PATH ~/.chainreaction/font.ttf --SAVED_GAME_PATH ~/.chainreaction/ \$*" >> /usr/bin/chain
chmod +x /usr/bin/chain
fi
fi
echo "creating .chainreaction directory in home..."
mkdir ~/.chainreaction
cp chain ~/.chainreaction/chain
cp support/font.ttf ~/.chainreaction
cp support/chain_help.txt ~/.chainreaction
echo "game successfully installed"