forked from gameblabla/gmenunx
-
Notifications
You must be signed in to change notification settings - Fork 8
/
make_opk.sh
executable file
·63 lines (50 loc) · 1.28 KB
/
make_opk.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#!/bin/bash
APP_NAME="esoteric";
OPK_EXTENSION=".opk";
ASSETS_PATH="dist/RG350/esoteric";
argCount=$#
OPK_NAME="${APP_NAME}${OPK_EXTENSION}"
SUPPORTED_PLATFORMS=("gcw0" "retrofw")
# ----------------------------- #
echo "Enter make_opk.sh"
if [ ! -d ${ASSETS_PATH} ]; then
echo "Can't find ${ASSETS_PATH}, You need to run a make dist first"
exit 1
fi
if (( ${argCount} > 0 )); then
echo "we got a name override : $1"
OPK_NAME="${1}"
fi
if (( ${argCount} > 1 )); then
echo "we got a version override : $2"
VERSION="${2}"
fi
echo "Making opk : ${OPK_NAME}"
FLIST="${ASSETS_PATH}/*"
for myPlatform in ${SUPPORTED_PLATFORMS[*]}; do
# create default.${myPlatform}.desktop
cat > default.${myPlatform}.desktop <<EOF
[Desktop Entry]
Name=350teric
Comment=Esoteric App Launcher
Exec=${APP_NAME}
Terminal=false
Type=Application
StartupNotify=true
Icon=logo
Categories=applications;
X-OD-Manual=esoteric.man.txt
Version=${VERSION}
EOF
FLIST="${FLIST} default.${myPlatform}.desktop"
done
# create opk
if [ -f ${OPK_NAME} ]; then
echo "removing already existing file : ${OPK_NAME}"
rm -f ${OPK_NAME}
fi
mksquashfs ${FLIST} ${OPK_NAME} -all-root -no-xattrs -noappend -no-exports
cat default.gcw0.desktop
rm -f default.*.desktop
echo "opk created at : ${OPK_NAME}"
exit 0