Add "master" shortcut

This commit is contained in:
DL6ER 2017-03-08 13:18:34 +01:00
parent 8a14a63d5d
commit d2ab0694b7
No known key found for this signature in database
GPG Key ID: 00135ACBD90B28DD
1 changed files with 9 additions and 1 deletions

View File

@ -125,13 +125,21 @@ checkout()
echo ":::"
if [[ "${2}" == "dev" ]] ; then
# Shortcut to check out development version
# Shortcut to check out development branches
echo "::: Shortcut \"dev\" detected - checking out development / devel branches ..."
echo "::: Pi-hole core"
checkout_pull_branch "${PI_HOLE_FILES_DIR}" "development"
echo "::: Web interface"
checkout_pull_branch "${WEB_INTERFACE_DIR}" "devel"
echo "::: done!"
elif [[ "${2}" == "master" ]] ; then
# Shortcut to check out master branches
echo "::: Shortcut \"master\" detected - checking out master branches ..."
echo "::: Pi-hole core"
checkout_pull_branch "${PI_HOLE_FILES_DIR}" "master"
echo "::: Web interface"
checkout_pull_branch "${WEB_INTERFACE_DIR}" "master"
echo "::: done!"
elif [[ "${2}" == "core" ]] ; then
# Have to user chosing the branch he wants
if ! (for e in "${corebranches[@]}"; do [[ "$e" == "${3}" ]] && exit 0; done); then