Skip to content

Commit

Permalink
code: avoid error in non-existent config
Browse files Browse the repository at this point in the history
  • Loading branch information
fichtner committed Jul 27, 2021
1 parent ea11531 commit eba62c4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion code/opnsense-code.sh
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,10 @@ git_update()
(cd "${DIRECTORY}/${REPO}"; git fetch --all --prune; git pull)
else
git clone ${SITE}/${ACCOUNT}/${REPO} "${DIRECTORY}/${REPO}"
BRANCH=$(make -C /usr/tools -V "$(echo ${REPO} | tr '[:lower:]' '[:upper:]')BRANCH" SETTINGS=${ABI})
BRANCH=
if [ -f ${CONF} ]; then
BRANCH=$(make -C /usr/tools -v "$(echo ${REPO} | tr '[:lower:]' '[:upper:]')BRANCH" SETTINGS=${ABI})
fi
if [ -n "${BRANCH}" ]; then
(cd "${DIRECTORY}/${REPO}"; git checkout ${BRANCH})
fi
Expand Down

0 comments on commit eba62c4

Please sign in to comment.