forked from Trifindo/Pokemon-DS-Map-Studio
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathpdsms-linux.sh
executable file
·42 lines (35 loc) · 1.21 KB
/
pdsms-linux.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
#!/usr/bin/env bash
# check that unzip is present
command -v unzip >/dev/null 2>&1 || {
echo >&2 "This script requires gunzip!"
exit 1
}
# check if wget is present
command -v wget >/dev/null 2>&1 || {
echo >&2 "This script requires wget!"
exit 1
}
# check if java is present
command -v java >/dev/null 2>&1 || {
echo >&2 "This script requires java!"
exit 1
}
# download PDSMS 2.2 to local user applications
cd ~/.local/share/applications/ || exit
wget "https://github.com/Trifindo/Pokemon-DS-Map-Studio/releases/download/2.2/Pokemon.DS.Map.Studio-2.2.zip"
unzip "Pokemon.DS.Map.Studio-2.2.zip"
# remove the downloaded archive
rm -f "Pokemon.DS.Map.Studio-2.2.zip"
# download icon
wget "https://github.com/Trifindo/Pokemon-DS-Map-Studio/raw/master/src/main/resources/icons/programIconHD.png"
mv "programIconHD.png" "Pokemon DS Map Studio-2.2/icon.png"
# create a desktop shortcut
echo "#!/usr/bin/env xdg-open
[Desktop Entry]
Type=Application
Name=Pokemon DS Map Studio
Exec=/usr/bin/java -jar \"${PWD}/Pokemon DS Map Studio-2.2/lib/Pokemon DS Map Studio-2.2.jar\"
Icon=${PWD}/Pokemon DS Map Studio-2.2/icon.png
Categories=Development;
" > PDSMS.desktop
echo "Pokemon DS Map Studio has been installed! Enjoy ;)"