Skip to content

Instantly share code, notes, and snippets.

@alterakey
Created November 3, 2011 02:37
Show Gist options
  • Save alterakey/1335632 to your computer and use it in GitHub Desktop.
Save alterakey/1335632 to your computer and use it in GitHub Desktop.
Android SDK bare build environment deployer (r13 and up)
#!/bin/sh
src=`dirname $0`
on=`pwd`
proj="$1"
activity="$2"
go_flag="$3"
if test -z "$activity"; then
echo "$0: usage: $0 <project name> <entry activity>"
echo "$0: usage: $0 <project name> <entry activity> go"
exit 127
fi
if test "x$go_flag" != "xgo"; then
echo "$0: would deploy on $on (under name of $proj, invoking $activity)"
exit 1
fi
cp $src/*.properties $on
cp $src/build.xml $on
sed -i '' -e "s/\\[\\[proj\\]\\]/$proj/g" $on/build.xml
sed -i '' -e "s/\\[\\[activity\\]\\]/$activity/g" $on/build.xml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment