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
[ "$1" = "" ] && echo "Please provide a branche to merge from" && exit 1
if [ "$1" != "-a" ] ; then
shift
cmd=""
while [ "$1" != "" ] ; do
cmd="$cmd $git checkout $1 && $git merge dev"
$git checkout $1 && $git merge dev
shift
done
cmd="$cmd && $git checkout dev"
else
branches="$(echo "$($git branch)" | sed -e 's/\*/ /;t')"
cmd=""
for arg in $branches ; do
if [ "$arg" != "dev" ] ; then
$git checkout $arg && $git merge dev
fi
done
cmd="$git checkout dev"
fi
cmd="$git checkout dev"
fi
$cmd