From 55da5cd7eaa5bd20ba98411bacbf6d89ba9d1feb Mon Sep 17 00:00:00 2001
From: John Van de Meulebrouck Brendgard <john@nordu.net>
Date: Sun, 28 Aug 2016 17:12:10 +0200
Subject: [PATCH] Included ft improvement to able to specify tag for bump-tag

Also changed from #!/bin/sh -> #!/bin/bash
since echo -e is not supported in sh
---
 bump-tag | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/bump-tag b/bump-tag
index 0bfe7be4..440809ba 100755
--- a/bump-tag
+++ b/bump-tag
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 set -e
 
@@ -8,7 +8,11 @@ echo "Fetching any updates from server:"
 git pull
 echo ""
 
-deftag=`basename $PWD`
+if [ "x$1" = "x" ]; then
+    deftag=`basename $PWD`
+else
+    deftag="$1"
+fi
 tagpfx=${tag:="$deftag"}
 
 last_tag=`git tag -l "${tagpfx}-*"|sort|tail -1`
@@ -39,7 +43,7 @@ done
 if [ "$deftag" != "$tagpfx" ]; then
     echo -e "Using new tag \e[94m$this_tag\e[0m according to pattern in cosmos.conf"
 else
-    echo "Using new tag \e[94m$this_tag\e[0m"
+    echo -e "Using new tag \e[94m$this_tag\e[0m"
 fi
 
 echo -e "\e[1mONLY SIGN IF YOU APPROVE OF VERIFICATION AND DIFF ABOVE\e[0m"