From 0118f64f81e89078ccf6aa9abda8111eaca9adff Mon Sep 17 00:00:00 2001 From: Jesse Vincent Date: Wed, 16 Mar 2011 17:59:25 -0400 Subject: [PATCH] Restore tools/build-beta to its former glory. It can now build a "K9 beta with different keys" that can sit next to an installed K-9. Run it as you would run ant sh tools/build-beta debug --- tools/build-beta | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/tools/build-beta b/tools/build-beta index 20a795828..129f1a028 100644 --- a/tools/build-beta +++ b/tools/build-beta @@ -1,12 +1,16 @@ -perl -pi -e's|\@string/app_name|\@string/beta_app_name|g' AndroidManifest.xml -perl -pi -e's|com/fsck/k9/R.java|com/fsck/k9beta/R.java|g' build.xml -find src/com/fsck -type f |xargs -n 1 perl -pi -e's|com.\fsck\.k9|com.fsck.k9beta|g' -mv src/com/fsck/k9 src/com/fsck/k9beta -perl -pi -e's|K9|K9-BETA|g' build.xml +BETA_PACKAGE=com.fsck.k9beta +BETA_PATH=com/fsck/k9beta +BETA_PROJ_NAME="K9 Beta" +perl -pi -e"s|\@string/app_name|\@string/beta_app_name|g" AndroidManifest.xml +perl -pi -e"s|com/fsck/k9/R.java|$BETA_PATH/R.java|g" build.xml +find src/com/fsck res -type f |xargs -n 1 perl -pi -e"s/com.fsck.k9(?=\W)/$BETA_PACKAGE/g" +perl -pi -e"s|com.fsck.k9|$BETA_PACKAGE|g" AndroidManifest.xml +mv src/com/fsck/k9 src/$BETA_PATH +perl -pi -e"s|K9|$BETA_PROJ_NAME|g" build.xml ant $@ -#mv src/com/fsck/k9beta src/com/fsck/k9 -#perl -pi -e's|K9-BETA|K9|g' build.xml -#perl -pi -e's|com\.fsck\.k9beta|com.fsck.k9|g' build.xml AndroidManifest.xml src/com/fsck/k9/provider/AttachmentProvider.java -#perl -pi -e's|com/fsck/k9beta/R.java|com/fsck/k9/R.java|g' build.xml -#perl -pi -e's|\@string/beta_app_name|\@string/app_name|g' AndroidManifest.xml -#find src/com/fsck -type f |xargs -n 1 perl -pi -e's|com.fsck.k9beta|com.fsck.k9|' +mv src/$BETA_PATH src/com/fsck/k9 +perl -pi -e"s|$BETA_PACKAGE|com.fsck.k9|g" AndroidManifest.xml +perl -pi -e"s|$BETA_PATH/R.java|com/fsck.k9/R.java|g" build.xml +find src/com/fsck res -type f |xargs -n 1 perl -pi -e"s/$BETA_PACKAGE(?=\W)/com.fsck.k9/g" +perl -pi -e"s|$BETA_PROJ_NAME|K9|g" build.xml +perl -pi -e"s|\@string/beta_app_name|\@string/app_name|g" AndroidManifest.xml