Revision: 10639
Author: rchan...@google.com
Date: Mon Sep 12 07:14:08 2011
Log: Support older bash interpreter in maven upload script
Review at http://gwt-code-reviews.appspot.com/1537806
http://code.google.com/p/google-web-toolkit/source/detail?r=10639
Modified:
/trunk/maven/lib-gwt.sh
/trunk/maven/push-gwt.sh
=======================================
--- /trunk/maven/lib-gwt.sh Fri Sep 9 10:31:05 2011
+++ /trunk/maven/lib-gwt.sh Mon Sep 12 07:14:08 2011
@@ -46,8 +46,6 @@
shift
local gwtSdkArchive=$1
shift
- local gwtCl=$1
- shift
local mavenRepoUrl=$1
shift
local mavenRepoId=$1
@@ -101,6 +99,7 @@
# Get rid of the INDEX.LIST file, since it's going to be out of date
# once we rename the jar files for Maven
+ echo "Removing INDEX.LIST from gwt-${i}"
zip -d $CUR_FILE META-INF/INDEX.LIST
SOURCES_FILE=gwt-${i}-sources.jar
=======================================
--- /trunk/maven/push-gwt.sh Fri Sep 9 10:31:05 2011
+++ /trunk/maven/push-gwt.sh Mon Sep 12 07:14:08 2011
@@ -20,29 +20,51 @@
# use GWT_MAVEN_REPO_URL if set else M2_REPO else default location for
local repo
localRepoUrl=${M2_REPO:="$HOME/.m2/repository"}
localRepoUrl="file://$localRepoUrl"
-repoUrl=${GWT_MAVEN_REPO_URL:=$localRepoUrl}
+repoUrlDefault=${GWT_MAVEN_REPO_URL:=$localRepoUrl}
# repo id is ignored by local repo
repoId=${GWT_MAVEN_REPO_ID:=none}
# prompt for info
-read -e -p"GWT version for Maven (ex: 2.4.0): " -i "$GWT_VERSION"
gwtVersion
+read -e -p"GWT version for Maven (ex: 2.4.0): " gwtVersion
+case $gwtVersion in
+ *.*.* )
+ ;;
+ * )
+ echo "Please enter a version of the form x.y.z"
+ exit 1;;
+esac
+
gwtTrunk=$(dirname $(pwd))
if [ -f ${gwtTrunk}/build/dist/gwt-*.zip ]; then
- gwtPath=$(ls ${gwtTrunk}/build/dist/gwt-*.zip | head -n1)
+ gwtPathDefault=$(ls ${gwtTrunk}/build/dist/gwt-*.zip | head -n1)
+ gwtPathPrompt=" ($gwtPathDefault)"
fi
-read -e -p"Path to GWT distro zip: " -i "$gwtPath" gwtPath
+read -e -p"Path to GWT distro zip $gwtPathPrompt: " gwtPath
+case $gwtPath in
+ "" )
+ gwtPath=$gwtPathDefault
+ ;;
+ * )
+ ;;
+esac
if [[ "$gwtPath" == "" || ! -f $gwtPath ]]; then
echo "ERROR: Cannot find file at \"$gwtPath\""
exit 1
fi
-read -e -p"Deploy to repo URL: " -i "$repoUrl" repoUrl
+
+read -e -p"Deploy to repo URL ($repoUrlDefault): " repoUrl
+case $repoUrl in
+ "" )
+ repoUrl=$repoUrlDefault
+ ;;
+ * )
+ ;;
+esac
+
read -p"GPG passphrase for jar signing (may skip for local deployment): "
gpgPassphrase
-# GWT from distribution ZIP
-gwtCl=$(ls -lrt $gwtPath | tail -n2 | head -n1 | sed
-r 's/.*r([0-9]+).zip.*/\1/')
maven-gwt "$gwtVersion" \
"$gwtPath" \
- "$gwtCl" \
"$repoUrl" \
"$repoId"
--
http://groups.google.com/group/Google-Web-Toolkit-Contributors