Whamcloud - gitweb
hack to always use root credential between client and oss.
[fs/lustre-release.git] / build / branch.sh
index 328aeff..b64681f 100755 (executable)
@@ -12,7 +12,7 @@ parent=$1
 child=$2
 CHILD=`echo $child | sed -e "s/^b_//" | tr "[a-z]" "[A-Z]"`
 dir=${3:-.}
-module=$(<$dir/CVS/Repository)
+module=$(basename $(<$dir/CVS/Repository))
 
 if [ "$module" = "lustre" ] ; then
     echo >&2 "${progname}: You probably want to branch lustre or portals."
@@ -31,7 +31,7 @@ case $child in
   *) child="b_$child"
 esac
 
-if [ "$parent" != "HEAD" -a "`cat $dir/CVS/Tag`" != "T$parent" ]; then
+if test "$parent" != "HEAD" -a -f $dir/CVS/Tag -a "`cat $dir/CVS/Tag`" != "T$parent"; then
        echo "This script must be run within the $parent branch"
        exit 1
 fi