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 root /bin/chmod -R ${mode} "${gitdir}"
|
||||
echo "[-] git checkout ${branch}"
|
||||
if ! doas -u _portzap "${git}" \
|
||||
doas -u _portzap "${git}" \
|
||||
checkout -t \
|
||||
origin/"${branch}" \
|
||||
> /dev/null 2>&1; then
|
||||
r="${?}"
|
||||
echo "[-] 'git checkout' exited with an error"
|
||||
exit "${r}"
|
||||
else
|
||||
echo "[-] Done"
|
||||
fi
|
||||
> /dev/null 2>&1
|
||||
echo "[-] Done"
|
||||
|
|
Loading…
Reference in a new issue