Created
December 14, 2021 08:35
-
-
Save daktak/d40f4f07e77b0a1d379e2ba7436cdba6 to your computer and use it in GitHub Desktop.
Revisions
-
daktak created this gist
Dec 14, 2021 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,49 @@ #!/bin/bash USER=`whoami` DIR="/home/${USER}/Games/zwift/drive_c/users/daktak/Documents/Zwift" case $1 in 1 | Watopia ) WORLD=2 ;; 2 | Richmond ) WORLD=2 ;; 3 | London ) WORLD=3 ;; 4 | "New York" | NY ) WORLD=4 ;; 5 | Innsbruck ) WORLD=5 ;; 7 | Yorkshire ) WORLD=7 ;; 9 | "Makuri Island" | MI ) WORLD=9 ;; 10 | France ) WORLD=10 ;; 11 | Paris ) WORLD=11 ;; esac if [[ -z $WORLD ]]; then xmlstarlet ed --inplace -d //ZWIFT//WORLD \ $DIR/prefs.xml else xmlstarlet ed --inplace \ --subnode ZWIFT --type elem --name "WORLD" --value $WORLD \ $DIR/prefs.xml fi