Skip to content

Commit

Permalink
feat: Allow to checkout another branch of MyTomato
Browse files Browse the repository at this point in the history
  • Loading branch information
toulousain79 committed Sep 22, 2024
1 parent 21cb89f commit efb2fbc
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions root/SCRIPTs/Upgrade.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ if [[ ${gbRepoUpgrade_Enable:-0} -eq 1 ]]; then
[[ -d /opt/MyTomato ]] && cd "/opt/MyTomato" || exit 1
logger -p user.notice "| ${gsScriptName} | Update /opt/MyTomato via GitHub"
git fetch origin
git reset --hard origin/master
git reset --hard origin/"${gsMyTomatoBranch}"
git config pull.rebase false
git pull origin master
git pull origin "${gsMyTomatoBranch}"
fi

#### DNScrypt-proxy v2
Expand Down
5 changes: 4 additions & 1 deletion root/SCRIPTs/inc/vars
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ gsUrlArmExtras="https://exotic.se/freshtomato-arm/${gsFirmwareYear}/${gsFirmware
gsLocales="en_US"
gsTimezone="Europe/Paris"

## MyTomato
gsMyTomatoBranch="master"

## Colors
export CEND="\033[0m"
export CDEFAULT='\033[0;39m'
Expand Down Expand Up @@ -84,7 +87,7 @@ gsExternalDns="" # External DNS server like PiHole instead
gbRepoUpgrade_Enable=1 # Off = 0 / On = 1

#### Export
export binCurl gsDirArmExtras gsUrlArmExtras gsLocales gsTimezone
export binCurl gsDirArmExtras gsUrlArmExtras gsLocales gsTimezone gsMyTomatoBranch
export gsScriptName gsDirRoot gsDirScripts gsDirOpenVpn gsDirBackups gsDirLogs gsDirTemplates gsDirOverLoad gsDirDnscrypt gsDirDnscryptGen
export gsUsbFileSystem gsUsbOptUuid gsWan1_DNS gsExternalDns gsP2Partisan_UdpPorts gsP2Partisan_TcpPorts
export gdDateTime
Expand Down
1 change: 1 addition & 0 deletions root/TEMPLATEs/vars.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ gsUsbOptUuid=""
# Locales
gsLocales="en_US" # ex: "fr_FR", check /opt/usr/share/i18n/locales/
gsTimezone="Europe/Paris" # https://github.com/Entware/Entware/wiki/Using-time-zones
gsMyTomatoBranch="master"

########################################
#### Services
Expand Down

0 comments on commit efb2fbc

Please sign in to comment.