Merge branch 'master' into karthik/installdirs
diff --git a/scripts/packages/client_template_bin.sh b/scripts/packages/client_template_bin.sh
index b5c05f9..64c22a2 100755
--- a/scripts/packages/client_template_bin.sh
+++ b/scripts/packages/client_template_bin.sh
@@ -35,7 +35,7 @@
 function usage() {
   echo "Usage: $progname [options]" >&2
   echo "Options are:" >&2
-  echo "  --prefix=/some/path set the prefix path." >&2
+  echo "  --prefix=/some/path set the prefix path (default=/usr/local/heron)." >&2
   echo "  --heronrc= set the heronrc path (default=/usr/local/heron/etc/heron.heronrc)." >&2
   echo "  --user configure for user install, expands to" >&2
   echo '           `--prefix=$HOME/.heron --heronrc=$HOME/.heronrc`.' >&2
diff --git a/scripts/packages/tools_template_bin.sh b/scripts/packages/tools_template_bin.sh
index 5a68f5e..01785f5 100755
--- a/scripts/packages/tools_template_bin.sh
+++ b/scripts/packages/tools_template_bin.sh
@@ -21,6 +21,12 @@
 
 progname="$0"
 
+VERSION=$(cat << EOF | grep heron.build.version | awk -F: '{print $2}' | xargs echo
+%release_info%
+EOF
+)
+version_dir=heron-$(echo $VERSION | sed 's/\//_/')
+
 echo "Heron tools installer"
 echo "---------------------"
 echo
@@ -28,7 +34,7 @@
 function usage() {
   echo "Usage: $progname [options]" >&2
   echo "Options are:" >&2
-  echo "  --prefix=/some/path set the prefix path (default=/usr/local)." >&2
+  echo "  --prefix=/some/path set the prefix path (default=/usr/local/heron/tools)." >&2
   echo "  --user configure for user install, expands to" >&2
   echo '           `--prefix=$HOME/.herontools`.' >&2
   exit 1
@@ -36,7 +42,7 @@
 
 prefix="/usr/local"
 bin="%prefix%/bin"
-base="%prefix%/herontools"
+base="%prefix%/heron/${version_dir}/tools"
 
 for opt in "${@}"; do
   case $opt in
@@ -45,7 +51,7 @@
       ;;
     --user)
       bin="$HOME/bin"
-      base="$HOME/.herontools"
+      base="$HOME/.heron/${version_dir}/tools"
       ;;
     *)
       usage