From 1edb0b7cb17a557ea662b352ea22504621cbaf60 Mon Sep 17 00:00:00 2001 From: Austen Adler Date: Mon, 4 Aug 2014 16:37:19 -0400 Subject: [PATCH] Fixed *initify --- bashrc | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/bashrc b/bashrc index 03d52c9..94053b2 100644 --- a/bashrc +++ b/bashrc @@ -162,14 +162,12 @@ function cinitify(){ git remote add oOrigin git@10.0.1.200:$1/$2.git git remote add oHttps https://10.0.1.200/gitlab/$1/$2.git git remote -v - while getopts ":r" VALUE "$@"; do - if [ ! "$VALUE" = "r" ] ; then - echo -n "Pull from: " - read from - git pull $FROM - git checkout master - fi - done + if [[ ! $3 == "-r" ]] ; then + echo -n "Pull from: " + read from + git pull $FROM + git checkout master + fi } export -f cinitify function initify(){ @@ -180,14 +178,12 @@ function initify(){ git remote add oOrigin git@10.0.1.200:$1/$2.git git remote add oHttps https://10.0.1.200/gitlab/$1/$2.git git remote -v - while getopts ":r" VALUE "$@"; do - if [ ! "$VALUE" = "r" ] ; then - echo -n "Pull from: " - read from - git pull $FROM - git checkout master - fi - done + if [[ ! $3 == "-r" ]] ; then + echo -n "Pull from: " + read from + git pull $FROM + git checkout master + fi } export -f initify