aboutsummaryrefslogtreecommitdiff
path: root/dists/android/mkplugin.sh
diff options
context:
space:
mode:
authordhewg2011-04-09 18:28:02 +0200
committerdhewg2011-04-09 18:39:35 +0200
commit90f47c7b1d9725c13d972a0e2a61b2cd966bbab5 (patch)
treea419432cdcac23b630805046b71d5a87e701178c /dists/android/mkplugin.sh
parent44ab256101c8beec0860538127c2c7d602366c71 (diff)
downloadscummvm-rg350-90f47c7b1d9725c13d972a0e2a61b2cd966bbab5.tar.gz
scummvm-rg350-90f47c7b1d9725c13d972a0e2a61b2cd966bbab5.tar.bz2
scummvm-rg350-90f47c7b1d9725c13d972a0e2a61b2cd966bbab5.zip
ANDOID: Replace mkmanifest.pl with sh/sed code
Removes build dependencies like perl and its XML modules
Diffstat (limited to 'dists/android/mkplugin.sh')
-rwxr-xr-xdists/android/mkplugin.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/dists/android/mkplugin.sh b/dists/android/mkplugin.sh
new file mode 100755
index 0000000000..f4643132cf
--- /dev/null
+++ b/dists/android/mkplugin.sh
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+if [ $# -ne 5 ]; then
+ echo "usage: $0 configure plugin template versioncode target"
+ exit 1
+fi
+
+CONFIGURE=$1
+PLUGIN_NAME=$2
+TEMPLATE=$3
+PLUGIN_VERSION_CODE=$4
+TARGET=$5
+
+PLUGIN_DESC=`sed -n s/add_engine\s$PLUGIN_NAME\s\"\(.\+\)\"\s.*/\1/p` < $CONFIGURE
+
+sed "s|@PLUGIN_NAME@|$PLUGIN_NAME|;s|@PLUGIN_VERSION_CODE@|$PLUGIN_VERSION_CODE|;s|@PLUGIN_DESC@|$PLUGIN_DESC|" < $TEMPLATE > $TARGET
+