@@ -16,33 +16,16 @@
16set -o nounset
16set -o nounset
17set -o errexit
17set -o errexit
19−DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
19+. lib/common.sh
22−SOURCES_TXT="$( dirname $DIR)/sources.txt"
25−readarray -t SOURCES < "$SOURCES_TXT"
28− echo " bump-versions <POSITION> [-d|--dry-run]"
22+ echo " bump-versions.sh <POSITION> [-d|--dry-run]"
29 echo " | [-h|--help]"
23 echo " | [-h|--help]"
30 echo " Bumps the specified positional version of all servant packages."
24 echo " Bumps the specified positional version of all servant packages."
31 echo " POSITION is a number between 0 and 3, inclusive."
25 echo " POSITION is a number between 0 and 3, inclusive."
35−join () { local IFS="$1"; shift; echo "$*"; }
38− local NUM=$(find . -name 'servant*.cabal' | xargs grep "^version:" | awk '{ print $2 }' | uniq -c | wc -l)
39− if [ 1 -eq $NUM ] ; then
42− echo "versions of packages are not all the same!" && exit 1
46if [ $# -eq 0 ] ; then
29if [ $# -eq 0 ] ; then
47 echo "expecting one or more arguments. Got 0"
30 echo "expecting one or more arguments. Got 0"