fix: fix merge in `.local/bin/dot`

This commit is contained in:
swy7ch 2020-05-07 12:58:53 +02:00
parent 8ede2ed945
commit 1a03c0f1c1
1 changed files with 2 additions and 6 deletions

View File

@ -23,23 +23,19 @@ if [ "$1" = "-m" ] ; then
shift shift
[ "$1" = "" ] && echo "Please provide a branche to merge from" && exit 1 [ "$1" = "" ] && echo "Please provide a branche to merge from" && exit 1
if [ "$1" != "-a" ] ; then if [ "$1" != "-a" ] ; then
shift
cmd=""
while [ "$1" != "" ] ; do while [ "$1" != "" ] ; do
cmd="$cmd $git checkout $1 && $git merge dev" $git checkout $1 && $git merge dev
shift shift
done done
cmd="$cmd && $git checkout dev"
else else
branches="$(echo "$($git branch)" | sed -e 's/\*/ /;t')" branches="$(echo "$($git branch)" | sed -e 's/\*/ /;t')"
cmd=""
for arg in $branches ; do for arg in $branches ; do
if [ "$arg" != "dev" ] ; then if [ "$arg" != "dev" ] ; then
$git checkout $arg && $git merge dev $git checkout $arg && $git merge dev
fi fi
done done
cmd="$git checkout dev"
fi fi
cmd="$git checkout dev"
fi fi
$cmd $cmd