mirror of https://github.com/apache/activemq.git
NO-JIRA: tweak script to default to a version-named dir, allow specifying alternative, and exit if it already exists
This commit is contained in:
parent
6e33507bf2
commit
c513bd7ba8
|
@ -26,7 +26,7 @@ error () {
|
||||||
echo ""
|
echo ""
|
||||||
echo "$@"
|
echo "$@"
|
||||||
echo ""
|
echo ""
|
||||||
echo "Usage: ./prepare-release.sh repo-url version"
|
echo "Usage: ./prepare-release.sh repo-url version [target-dir (defaults to version, must not exist)]"
|
||||||
echo ""
|
echo ""
|
||||||
echo "example:"
|
echo "example:"
|
||||||
echo "./prepare-release.sh https://repo1.maven.org/maven2 5.15.0"
|
echo "./prepare-release.sh https://repo1.maven.org/maven2 5.15.0"
|
||||||
|
@ -62,15 +62,16 @@ doDownload () {
|
||||||
sha512sum $theFile > $theFile.sha512
|
sha512sum $theFile > $theFile.sha512
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ "$#" != 2 ]; then
|
if [ "$#" -lt 2 ]; then
|
||||||
error "Cannot match arguments"
|
error "Cannot match arguments"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
release=$2
|
release=$2
|
||||||
target="activemq-$2"
|
target=${3-$2}
|
||||||
|
echo "Target Directory: $target"
|
||||||
|
|
||||||
if [ -d $target ]; then
|
if [ -d $target ]; then
|
||||||
cd $target
|
error "Directory $target already exists, stopping"
|
||||||
else
|
else
|
||||||
echo "Directory $target does not exist, creating"
|
echo "Directory $target does not exist, creating"
|
||||||
mkdir $target
|
mkdir $target
|
||||||
|
@ -85,7 +86,7 @@ doDownload $binRepoURL apache-activemq-$release-bin.zip
|
||||||
doDownload $binRepoURL apache-activemq-$release-bin.tar.gz
|
doDownload $binRepoURL apache-activemq-$release-bin.tar.gz
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo "--- Download Complate for Release $2 Artifacts are in $target---"
|
echo "--- Download Complete for Release $2 Artifacts are in $target---"
|
||||||
echo ""
|
echo ""
|
||||||
echo "Validating all MD5 checksum files"
|
echo "Validating all MD5 checksum files"
|
||||||
md5sum -c *.md5
|
md5sum -c *.md5
|
||||||
|
|
Loading…
Reference in New Issue