From d365147744c32a51e3af394288a538e3e57da162 Mon Sep 17 00:00:00 2001 From: pvincent Date: Sat, 8 Aug 2026 13:15:05 +0400 Subject: [PATCH] quick fix --- lib/init.bash | 7 +++---- lib/self-upgrade.bash | 3 --- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/lib/init.bash b/lib/init.bash index aa6bba1..280aa18 100755 --- a/lib/init.bash +++ b/lib/init.bash @@ -29,12 +29,10 @@ function no_more_skeleton { } function link_etc { - echo 1 local filename="$1" subfolder="${2:-}" local link_name="$filename" [[ -v LINK_NAME ]] && link_name="$LINK_NAME" - echo 2 local source="$MIAOU_BASH_DIR/etc" local destination="/etc" [[ -n "$subfolder" ]] && source+="/${subfolder}" && destination+="/${subfolder}" @@ -51,7 +49,6 @@ function link_etc { ln -s "$source/$filename" "$destination/$link_name" echo "link $source/$link_name created" fi - echo 3 } function link_config_files { @@ -72,10 +69,12 @@ function link_config_files { } function in_azerty_zone { + [[ -L /etc/localtime ]] || return 1 + local zone zone=$(readlink /etc/localtime) zone="${zone#/usr/share/zoneinfo/}" # remove prefix - for i in "${AZERTY_ZONES[@]}"; do [[ "$zone" == "$i" ]] && return 0; done + for i in "${AZERTY_ZONES[@]}"; do [[ "$zone" == "$i" ]] && return; done return 1 } diff --git a/lib/self-upgrade.bash b/lib/self-upgrade.bash index bba2dc5..46fba02 100755 --- a/lib/self-upgrade.bash +++ b/lib/self-upgrade.bash @@ -29,12 +29,9 @@ if [[ "$current" == "$latest" ]]; then else # TODO: prevent refresh from development purpose rm -rf "$MIAOU_BASH_DIR" - echo BEFORE bootstrap bootstrap - echo BEFORE init miaou-bash "$MIAOU_BASH_DIR/lib/init.bash" - echo AFTER INIT echo "miaou-bash successfully updated" miaou-bash --version fi