blob: 8599cd5a5b5b01508ba359812efdd5fc8a60c87f (
plain)
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
|
#!/usr/bin/env sh
# exit on error
set -e
# Move to script's directory
SCRIPT_DIR="$(dirname "$(readlink -f "$0")")"
cd "${SCRIPT_DIR}"
#add .desktop file (which should allow most DE's easy access to the program
mkdir -p ~/.local/share/applications
# desktop files don't like spaces in the Exec field, we have to replace them with "\s"
appimage="$(echo Attorney_Online-*-x86_64.AppImage)"
escaped_exec="$(echo "$(pwd)" | sed 's/ /\\s/g')"/"$appimage"
desktop_file="\
[Desktop Entry]
Type=Application
Name=Attorney Online
Comment=The courtroom drama simulator
Path=$(pwd)
Exec=\"$escaped_exec\"
Icon=$(pwd)/icon.png"
echo "$desktop_file" > ~/.local/share/applications/'Attorney Online'.desktop
#marking the program as executable
chmod +x Attorney_Online-*-x86_64.AppImage
#running the executable
./Attorney_Online-*-x86_64.AppImage
|