-
Notifications
You must be signed in to change notification settings - Fork 28
/
flappy_install.sh
executable file
·34 lines (34 loc) · 1.05 KB
/
flappy_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
clear -x
cd /tmp
echo "Flappy Bird script started!"
echo "Installing Dependencies"
echo
sudo apt install --assume-yes subversion subversion libsdl1.2-dev libsdl2-mixer-dev libsdl2-dev libsdl-mixer1.2-dev libsdl2-image-dev || error "Dependency installs failed"
sudo apt install --assume-yes libsndio* || error "Dependency installs failed"
echo
status "Downloading and compiling the game"
rm -rf flappy
git clone https://github.com/theofficialgman/flappy.git --depth=1 || error "Could not download the source code"
cd flappy
make 7b_1 || error "Compilation failed"
echo
echo "Erasing files to save space..."
echo
rm .gitignore
rm Makefile
rm -rf ./Code
rm -rf ./.git
rm -rf ./DevDox
rm -rf ./Promotion
rm -rf flappy_install.sh
sudo rm -f /usr/share/applications/flappy.desktop
sudo mv flappy.desktop -t /usr/share/applications
cd /tmp
cp /usr/share/flappy/Builds/Linux/hiscore hiscore
sudo rm -rf /usr/share/flappy
sudo mv flappy -t /usr/share
cp hiscore /usr/share/flappy/Builds/Linux/hiscore
status_green "Game installed!"
sleep 2
echo
echo "Sending you back to the main menu..."