54 lines
2.1 KiB
Diff
54 lines
2.1 KiB
Diff
|
diff --git a/tools/build-beta b/tools/build-beta
|
||
|
index 8061ec9..01b0725 100755
|
||
|
--- a/tools/build-beta
|
||
|
+++ b/tools/build-beta
|
||
|
@@ -44,12 +44,12 @@ DIST_LOGTAG=k9
|
||
|
DIST_PROJ_NAME=K9
|
||
|
DIST_APP_NAME='\@string/app_name'
|
||
|
|
||
|
-BETA_TLD=com
|
||
|
-BETA_DOMAIN=fsck
|
||
|
-BETA_PROJECT=k9beta
|
||
|
-BETA_LOGTAG=k9beta
|
||
|
-BETA_PROJ_NAME='K9 Beta'
|
||
|
-BETA_APP_NAME='K-9 Beta'
|
||
|
+BETA_TLD=org
|
||
|
+BETA_DOMAIN=fdroid
|
||
|
+BETA_PROJECT=k9
|
||
|
+BETA_LOGTAG=k9
|
||
|
+BETA_PROJ_NAME='K9~'
|
||
|
+BETA_APP_NAME='K-9~'
|
||
|
|
||
|
# Nothing below here should need to be changed.
|
||
|
|
||
|
@@ -79,29 +79,5 @@ if [[ "${DIST_TLD}" != "${BETA_TLD}" ]]; then
|
||
|
mv ${TEST_DIR}/src/${DIST_TLD} ${TEST_DIR}/src/${BETA_TLD}
|
||
|
fi
|
||
|
|
||
|
-# do ant and save exit status:
|
||
|
-ant $@
|
||
|
MYEXIT=$?
|
||
|
|
||
|
-# convert back to normal project:
|
||
|
-if [[ "${DIST_TLD}" != "${BETA_TLD}" ]]; then
|
||
|
- mv ${PROJECT_DIR}/src/${BETA_TLD} ${PROJECT_DIR}/src/${DIST_TLD}
|
||
|
- mv ${TEST_DIR}/src/${BETA_TLD} ${TEST_DIR}/src/${DIST_TLD}
|
||
|
-fi
|
||
|
-if [[ "${DIST_DOMAIN}" != "${BETA_DOMAIN}" ]]; then
|
||
|
- mv ${PROJECT_DIR}/src//${DIST_TLD}/${BETA_DOMAIN} ${PROJECT_DIR}/src/${DIST_TLD}/${DIST_DOMAIN}
|
||
|
- mv ${TEST_DIR}/src//${DIST_TLD}/${BETA_DOMAIN} ${TEST_DIR}/src/${DIST_TLD}/${DIST_DOMAIN}
|
||
|
-fi
|
||
|
-if [[ "${DIST_PROJECT}" != "${BETA_PROJECT}" ]]; then
|
||
|
- mv ${PROJECT_DIR}/src/${DIST_TLD}/${DIST_DOMAIN}/${BETA_PROJECT} ${PROJECT_DIR}/src/${DIST_TLD}/${DIST_DOMAIN}/${DIST_PROJECT}
|
||
|
- mv ${TEST_DIR}/src/${DIST_TLD}/${DIST_DOMAIN}/${BETA_PROJECT} ${TEST_DIR}/src/${DIST_TLD}/${DIST_DOMAIN}/${DIST_PROJECT}
|
||
|
-fi
|
||
|
-find ${PROJECT_DIR}/src/${DIST_TLD}/${DIST_DOMAIN} ${PROJECT_DIR}/res ${TEST_DIR}/src/${DIST_TLD}/${DIST_DOMAIN} ${TEST_DIR}/res \
|
||
|
- -type f -print0 | xargs -0 perl -pi -e"s/${BETA_PACKAGE}(?=\W)/${DIST_PACKAGE}/g"
|
||
|
-perl -pi -e"s|LOG_TAG = \"${BETA_LOGTAG}\"|LOG_TAG = \"${DIST_LOGTAG}\"|" ${PROJECT_DIR}/src/${DIST_PATH}/${DIST_PROJ_NAME}.java
|
||
|
-perl -pi -e"s|${BETA_PROJ_NAME}|${DIST_PROJ_NAME}|g" ${PROJECT_DIR}/build.xml ${TEST_DIR}/build.xml
|
||
|
-perl -pi -e"s|${BETA_PACKAGE}|${DIST_PACKAGE}|g" ${PROJECT_DIR}/AndroidManifest.xml ${TEST_DIR}/AndroidManifest.xml
|
||
|
-perl -pi -e"s|${BETA_APP_NAME}|${DIST_APP_NAME}|g" ${PROJECT_DIR}/AndroidManifest.xml
|
||
|
-
|
||
|
-# exit with value from ant:
|
||
|
-exit ${MYEXIT}
|