You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ho...@apache.org on 2013/09/25 21:20:12 UTC
svn commit: r1526271 -
/lucene/dev/trunk/dev-tools/scripts/prep-solr-ref-guide-rc.sh
Author: hossman
Date: Wed Sep 25 19:20:12 2013
New Revision: 1526271
URL: http://svn.apache.org/r1526271
Log:
SOLR-5085: the point of the subdir is so the files wouldn't have 'rc' in their name, and could be copied as is ... fix script to split X.Y-RCZ to build final file names, and vet that args look correct
Modified:
lucene/dev/trunk/dev-tools/scripts/prep-solr-ref-guide-rc.sh
Modified: lucene/dev/trunk/dev-tools/scripts/prep-solr-ref-guide-rc.sh
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/dev-tools/scripts/prep-solr-ref-guide-rc.sh?rev=1526271&r1=1526270&r2=1526271&view=diff
==============================================================================
--- lucene/dev/trunk/dev-tools/scripts/prep-solr-ref-guide-rc.sh (original)
+++ lucene/dev/trunk/dev-tools/scripts/prep-solr-ref-guide-rc.sh Wed Sep 25 19:20:12 2013
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
@@ -36,10 +36,28 @@ if [ $# -lt 2 ] || [ 3 -lt $# ] ; then
exit 1;
fi
-PREFIX="apache-solr-ref-guide"
SRC_FILE=$1
-DIR="$PREFIX-$2"
-PDF="$DIR/$PREFIX-$2.pdf"
+VER_RC=$2
+GPG_ID_ARG=""
+if [ ! -z "$3" ] ; then
+ GPG_ID_ARG="-u $3"
+fi
+
+VER_RC_PARTS=( ${VER_RC//-/ } )
+if [ 2 -ne ${#VER_RC_PARTS[@]} ] ; then
+ echo "! ! ! Can't proceed, Version+RC suffix must have one '-' (ie: X.Y-RCZ) : $VER_RC"
+ exit 1;
+fi
+VER=${VER_RC_PARTS[0]}
+VER_PARTS=( ${VER//./ } )
+if [ 2 -ne ${#VER_PARTS[@]} ] ; then
+ echo "! ! ! Can't proceed, Version must have one '.' (ie: X.Y) : $VER"
+ exit 1;
+fi
+
+PREFIX="apache-solr-ref-guide"
+DIR="$PREFIX-$VER_RC"
+PDF="$DIR/$PREFIX-$VER.pdf"
SHA="$PDF.sha1"
GPG="$PDF.asc"
@@ -53,11 +71,6 @@ if [ -d $DIR ] ; then
exit 1;
fi
-GPG_ID_ARG=""
-if [ ! -z "$3" ] ; then
- GPG_ID_ARG="-u $3"
-fi
-
# from here on, use set -x to echo progress and rely on decent error messages
# from shell commands that might fail.