Allow checkout after clone to fail
When $PORTZAP_BRANCH happens to be the default branch, 'git checkout' will exit with an error. Ignore.
This commit is contained in:
parent
1739b7d794
commit
94493d6040
1 changed files with 5 additions and 10 deletions
|
@ -32,13 +32,8 @@ echo "[-] Adjust filemode. This might take a while"
|
||||||
doas -u _portzap "${git}" config core.filemode off
|
doas -u _portzap "${git}" config core.filemode off
|
||||||
doas -u root /bin/chmod -R ${mode} "${gitdir}"
|
doas -u root /bin/chmod -R ${mode} "${gitdir}"
|
||||||
echo "[-] git checkout ${branch}"
|
echo "[-] git checkout ${branch}"
|
||||||
if ! doas -u _portzap "${git}" \
|
doas -u _portzap "${git}" \
|
||||||
checkout -t \
|
checkout -t \
|
||||||
origin/"${branch}" \
|
origin/"${branch}" \
|
||||||
> /dev/null 2>&1; then
|
> /dev/null 2>&1
|
||||||
r="${?}"
|
echo "[-] Done"
|
||||||
echo "[-] 'git checkout' exited with an error"
|
|
||||||
exit "${r}"
|
|
||||||
else
|
|
||||||
echo "[-] Done"
|
|
||||||
fi
|
|
||||||
|
|
Loading…
Reference in a new issue