Fix auto branch switch
This commit is contained in:
parent
0dbbaf5891
commit
69deea0979
11
setup.sh
11
setup.sh
@ -356,10 +356,15 @@ update_kohya_ss() {
|
|||||||
git -C "$DIR" pull "$GIT_REPO" "$BRANCH" >&3
|
git -C "$DIR" pull "$GIT_REPO" "$BRANCH" >&3
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! git -C "$DIR" switch "$BRANCH" >&4; then
|
if [ "$MANUAL_BRANCH_SWITCH" = false ]; then
|
||||||
echo "Branch $BRANCH did not exist. Creating it." >&4
|
git -C "$DIR" switch "$BRANCH" >&3
|
||||||
git -C "$DIR" switch -c "$BRANCH" >&4
|
else
|
||||||
|
if ! git -C "$DIR" switch "$BRANCH" >&4; then
|
||||||
|
echo "Branch $BRANCH did not exist. Creating it." >&4
|
||||||
|
git -C "$DIR" switch -c "$BRANCH" >&4
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "You need to install git."
|
echo "You need to install git."
|
||||||
|
Loading…
Reference in New Issue
Block a user