Merge pull request #2030 from pi-hole/new/StickFTLCheckoutBranch
Store checked out FTL branch in /etc/pihole/ftlbranch
This commit is contained in:
commit
856a2096eb
|
@ -256,6 +256,7 @@ checkout() {
|
||||||
get_binary_name
|
get_binary_name
|
||||||
local path
|
local path
|
||||||
path="development/${binary}"
|
path="development/${binary}"
|
||||||
|
echo "development" > /etc/pihole/ftlbranch
|
||||||
FTLinstall "${binary}" "${path}"
|
FTLinstall "${binary}" "${path}"
|
||||||
elif [[ "${1}" == "master" ]] ; then
|
elif [[ "${1}" == "master" ]] ; then
|
||||||
# Shortcut to check out master branches
|
# Shortcut to check out master branches
|
||||||
|
@ -270,6 +271,7 @@ checkout() {
|
||||||
get_binary_name
|
get_binary_name
|
||||||
local path
|
local path
|
||||||
path="master/${binary}"
|
path="master/${binary}"
|
||||||
|
echo "master" > /etc/pihole/ftlbranch
|
||||||
FTLinstall "${binary}" "${path}"
|
FTLinstall "${binary}" "${path}"
|
||||||
elif [[ "${1}" == "core" ]] ; then
|
elif [[ "${1}" == "core" ]] ; then
|
||||||
str="Fetching branches from ${piholeGitUrl}"
|
str="Fetching branches from ${piholeGitUrl}"
|
||||||
|
@ -332,6 +334,7 @@ checkout() {
|
||||||
|
|
||||||
if check_download_exists "$path"; then
|
if check_download_exists "$path"; then
|
||||||
echo " ${TICK} Branch ${2} exists"
|
echo " ${TICK} Branch ${2} exists"
|
||||||
|
echo "${2}" > /etc/pihole/ftlbranch
|
||||||
FTLinstall "${binary}" "${path}"
|
FTLinstall "${binary}" "${path}"
|
||||||
else
|
else
|
||||||
echo " ${CROSS} Requested branch \"${2}\" is not available"
|
echo " ${CROSS} Requested branch \"${2}\" is not available"
|
||||||
|
|
Loading…
Reference in New Issue