From 02f1f4fb16b0e0160b4b1693c260539de3442942 Mon Sep 17 00:00:00 2001 From: Amy Date: Wed, 10 Nov 2021 21:34:51 +0100 Subject: [PATCH] first step in making the timezone select with dialog, still commented out as it still needs fixing --- citrine.internal.sh | 11 +++++++++++ test.sh | 12 ++++++++++++ 2 files changed, 23 insertions(+) create mode 100755 test.sh diff --git a/citrine.internal.sh b/citrine.internal.sh index d5bd780..d202853 100755 --- a/citrine.internal.sh +++ b/citrine.internal.sh @@ -253,6 +253,17 @@ while [[ ! -f $TZ ]]; do TZ="/usr/share/zoneinfo/${PT}" done +#var=$(ls /usr/share/zoneinfo/ | sed 's/ /" "" "/g') +#var=$(echo $var | sed 's/ /" "" "/g') +#var=$(echo \"$var\") +#loc1=$(dialog --title "Citrine" --menu "Please pick a time zone" 20 100 43 $var "" --stdout) + +#var1=$(ls /usr/share/zoneinfo/$loc1 | sed 's/ /" "" "/g') +#var1=$(echo $var1 | sed 's/ /" "" "/g') +#var1=$(echo \"$var1\") +#loc2=$(dialog --title "Citrine" --menu "Please pick a time zone" 20 100 43 $var1 "" --stdout) +#TZ="/usr/share/zoneinfo/$loc1/$loc2" + arch-chroot /mnt ln-sf $TZ /etc/localtime inf "Set TZ to ${TZ}" inf "Syncing hardware offset" diff --git a/test.sh b/test.sh new file mode 100755 index 0000000..ff23ef4 --- /dev/null +++ b/test.sh @@ -0,0 +1,12 @@ +var=$(ls /usr/share/zoneinfo/ | sed 's/ /" "" "/g') +var=$(echo $var | sed 's/ /" "" "/g') +var=$(echo \"$var\") +loc1=$(dialog --title "Citrine" --menu "Please pick a time zone" 20 100 43 $var "" --stdout) +loc1=$(echo $loc1 | sed 's/"//g') +var1=$(ls /usr/share/zoneinfo/$loc1 | sed 's/ /" "" "/g') +var1=$(echo $var1 | sed 's/ /" "" "/g') +var1=$(echo \"$var1\") +loc2=$(dialog --title "Citrine" --menu "Please pick a time zone" 20 100 43 $var1 "" --stdout) +loc2=$(echo $loc2 | sed 's/"//g') +TZ="/usr/share/zoneinfo/$loc1/$loc2" +echo $TZ \ No newline at end of file