Replace tab with spaces
This commit is contained in:
parent
995815f8d7
commit
8de1473156
1 changed files with 41 additions and 41 deletions
|
@ -41,53 +41,53 @@ Usage:
|
||||||
The /master suffix on branch names is assumed.
|
The /master suffix on branch names is assumed.
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
-s,--source=<src_branch> Use <src_branch> as the source branch.
|
-s,--source=<src_branch> Use <src_branch> as the source branch.
|
||||||
Defaults is master
|
Defaults is master
|
||||||
/master suffix on other branches assumed
|
/master suffix on other branches assumed
|
||||||
-n,--test Don't do nothing, only test
|
-n,--test Don't do nothing, only test
|
||||||
-i,--ignore Ignore erroneous modules
|
-i,--ignore Ignore erroneous modules
|
||||||
-h,--help This help message
|
-h,--help This help message
|
||||||
-v,--verbose Increase verbosity
|
-v,--verbose Increase verbosity
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
# parse the arguments
|
# parse the arguments
|
||||||
while [ -n "$1" ] ; do
|
while [ -n "$1" ] ; do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
-h | --help )
|
-h | --help )
|
||||||
Usage
|
Usage
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
|
|
||||||
-v | --verbose )
|
-v | --verbose )
|
||||||
VERBOSE=$(($VERBOSE + 1))
|
VERBOSE=$(($VERBOSE + 1))
|
||||||
;;
|
;;
|
||||||
|
|
||||||
-i | --ignore )
|
-i | --ignore )
|
||||||
IGNORE="yes"
|
IGNORE="yes"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
-n | --test )
|
-n | --test )
|
||||||
TEST="yes"
|
TEST="yes"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
-s | --source )
|
-s | --source )
|
||||||
shift
|
shift
|
||||||
SRC_BRANCH=$1
|
SRC_BRANCH=$1
|
||||||
;;
|
;;
|
||||||
|
|
||||||
-b | --branch )
|
-b | --branch )
|
||||||
shift
|
shift
|
||||||
BRANCH=$1/master
|
BRANCH=$1/master
|
||||||
;;
|
;;
|
||||||
|
|
||||||
* )
|
* )
|
||||||
if [ -z "$BRANCH" ] ; then
|
if [ -z "$BRANCH" ] ; then
|
||||||
BRANCH="$1"
|
BRANCH="$1"
|
||||||
else
|
else
|
||||||
PACKAGES="$PACKAGES $1"
|
PACKAGES="$PACKAGES $1"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
shift
|
shift
|
||||||
done
|
done
|
||||||
|
@ -104,8 +104,8 @@ NEWP=
|
||||||
for p in $PACKAGES ; do
|
for p in $PACKAGES ; do
|
||||||
[ $VERBOSE -gt 1 ] && echo "Checking package $p..."
|
[ $VERBOSE -gt 1 ] && echo "Checking package $p..."
|
||||||
if [ ! -d $GITROOT/$p.git ] ; then
|
if [ ! -d $GITROOT/$p.git ] ; then
|
||||||
echo "ERROR: Package module $p is invalid" >&2
|
echo "ERROR: Package module $p is invalid" >&2
|
||||||
[ "$IGNORE" = "yes" ] && continue || exit -1
|
[ "$IGNORE" = "yes" ] && continue || exit -1
|
||||||
fi
|
fi
|
||||||
if [ -z "$(GIT_DIR=$GITROOT/$p.git git rev-parse -q --verify $SRC_BRANCH)" ] ; then \
|
if [ -z "$(GIT_DIR=$GITROOT/$p.git git rev-parse -q --verify $SRC_BRANCH)" ] ; then \
|
||||||
echo "ERROR: Invalid source branch '$SRC_BRANCH' for package $p" >&2; \
|
echo "ERROR: Invalid source branch '$SRC_BRANCH' for package $p" >&2; \
|
||||||
|
@ -117,8 +117,8 @@ for p in $PACKAGES ; do
|
||||||
fi
|
fi
|
||||||
$(GIT_DIR=$GITROOT/$p.git git rev-parse -q --verify \
|
$(GIT_DIR=$GITROOT/$p.git git rev-parse -q --verify \
|
||||||
$BRANCH >/dev/null) && \
|
$BRANCH >/dev/null) && \
|
||||||
(echo "IGNORING: Package module $p already has a branch $BRANCH" >&2; \
|
(echo "IGNORING: Package module $p already has a branch $BRANCH" >&2; \
|
||||||
[ "$IGNORE" = "yes" ] && continue || exit -1)
|
[ "$IGNORE" = "yes" ] && continue || exit -1)
|
||||||
NEWP="$NEWP $p"
|
NEWP="$NEWP $p"
|
||||||
done
|
done
|
||||||
PACKAGES="$(echo $NEWP)"
|
PACKAGES="$(echo $NEWP)"
|
||||||
|
@ -164,16 +164,16 @@ for NAME in $PACKAGES ; do
|
||||||
#[ $VERBOSE -gt 0 ] && echo "Creating $BRANCH-split tag for $NAME/$SRC_BRANCH..."
|
#[ $VERBOSE -gt 0 ] && echo "Creating $BRANCH-split tag for $NAME/$SRC_BRANCH..."
|
||||||
# Is the above needed?
|
# Is the above needed?
|
||||||
#cvs -Q rtag -f "$BRANCH-split" $TOPLEVEL/$NAME/$SRC_BRANCH || {
|
#cvs -Q rtag -f "$BRANCH-split" $TOPLEVEL/$NAME/$SRC_BRANCH || {
|
||||||
#echo "ERROR: Branch split tag for $NAME/$SRC_BRANCH could not be created" >&2
|
#echo "ERROR: Branch split tag for $NAME/$SRC_BRANCH could not be created" >&2
|
||||||
#exit -2
|
#exit -2
|
||||||
#}
|
#}
|
||||||
[ $VERBOSE -gt 0 ] && echo "Creating $NAME $BRANCH from $NAME $SRC_BRANCH..."
|
[ $VERBOSE -gt 0 ] && echo "Creating $NAME $BRANCH from $NAME $SRC_BRANCH..."
|
||||||
$(pushd $GITROOT/$NAME.git >/dev/null && \
|
$(pushd $GITROOT/$NAME.git >/dev/null && \
|
||||||
git branch --no-track $BRANCH $SRC_BRANCH && \
|
git branch --no-track $BRANCH $SRC_BRANCH && \
|
||||||
popd >/dev/null) || {
|
popd >/dev/null) || {
|
||||||
echo "ERROR: Branch $NAME $BRANCH could not be created" >&2
|
echo "ERROR: Branch $NAME $BRANCH could not be created" >&2
|
||||||
popd >/dev/null
|
popd >/dev/null
|
||||||
exit -2
|
exit -2
|
||||||
}
|
}
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue