diff --git a/build-debianrepo b/build-debianrepo index ad86610cc..b571248b8 100755 --- a/build-debianrepo +++ b/build-debianrepo @@ -43,6 +43,12 @@ do done shift $(($OPTIND - 1)) +if [ -z "$c_flag" -a -z "$d_flag" ] +then + printf "Usage: %s -c [-d ] { -l | [-u -p ] } [-a]\n" $(basename $0) >&2 + echo "-a Automatic: update only if there's any update on repo" + exit 2 +fi if [ ! -d $xcat_core_path ] then printf "%s: No such directory\n" "$xcat_core_path" >&2 diff --git a/build-ubunturepo b/build-ubunturepo index 4982c4be4..5546d616e 100755 --- a/build-ubunturepo +++ b/build-ubunturepo @@ -14,7 +14,7 @@ . /etc/lsb-release # Supported distributions -dists="maverick natty oneiric precise" +dists="maverick natty oneiric precise " a_flag= # automatic flag - only update if repo was updated c_flag= # xcat-core (trunk-delvel) path @@ -52,7 +52,7 @@ do done shift $(($OPTIND - 1)) -if [ -z "$c_flag" ] +if [ -z "$c_flag" -a -z "$d_flag" ] then printf "Usage: %s -c [-d ] { -l | [-u -p ] } [-a]\n" $(basename $0) >&2 echo "-a Automatic: update only if there's any update on repo" @@ -112,7 +112,7 @@ then else update_core=1 fi -if [ "$update_core" ] +if [ "$c_flag" -a "$update_core" ] then echo "###############################" echo "# Building xcat-core packages #"