summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFredrik Thulin <fredrik@thulin.net>2013-11-27 13:11:07 +0100
committerFredrik Thulin <fredrik@thulin.net>2013-11-27 13:11:07 +0100
commitc0f78591f828d2920e340e35c7ebcc6da0cd59e9 (patch)
tree07fb5d24fc5dd4e3e40923abc436c0ac8bbfd9ff
parent876d88124f6216912996808842d5a33d68228646 (diff)
-rwxr-xr-xaddhost5
1 files changed, 5 insertions, 0 deletions
diff --git a/addhost b/addhost
index 033c16b..988cf19 100755
--- a/addhost
+++ b/addhost
@@ -37,6 +37,11 @@ defrepo=`git remote -v | grep ${remote:="ro"} | grep fetch | awk '{print $2}'`
rrepo=${repo:="$defrepo"}
rtag=${tag:="changeme"}
+if [ "x$rrepo" = "x" ]; then
+ echo "$0: repo not set in cosmos.conf and no git branch named 'ro' found"
+ exit 1
+fi
+
if [ ! -d $cmd_hostname ]; then
cp -pr default $cmd_fqdn
git add $cmd_fqdn