forked from RazZziel/PortableLinuxGames
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathquickAppDir
executable file
·31 lines (25 loc) · 869 Bytes
/
quickAppDir
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
#!/bin/bash
# Author : Ismael Barros² <[email protected]>
# License : BSD http://en.wikipedia.org/wiki/BSD_license
pg4l_dir=$(dirname $(readlink -f $0))
. "$pg4l_dir/util.sh"
if [ -z "$*" ]; then
echo "Usage: $0 [binary]"
fi
for i in util.sh AppRun.desktop AppRun.png; do
{ [ -f "$i" ] || cp -v "$pg4l_dir/data/$i" "$i"; } || exit 1
done
if [ -f "$1" -a "${1##*.}" = "jar" ]; then
cp -v "$pg4l_dir/data/AppRun_java" AppRun || exit 1
desktopFile_setParameter "AppRun.desktop" "X-AppImage-Tags" "java"
else
cp -v "$pg4l_dir"/data/AppRun_quick AppRun || exit 1
fi
binary="$1"
if [ "$binary" ]; then
echo "Using binary $binary"
sed -e "s|_BINARY_|$1|g" AppRun -i
desktopFile_setParameter "AppRun.desktop" "Name" "$1 r1"
desktopFile_setParameter "AppRun.desktop" "X-AppImage-Title" "$1"
fi
desktopFile_setParameter "AppRun.desktop" "X-AppImage-Release" "1"