From 48e9fa25a7e1abe3f0fe3dc33816fab2b931b695 Mon Sep 17 00:00:00 2001 From: TCeason Date: Thu, 7 Nov 2024 23:03:59 +0800 Subject: [PATCH] chore: add tzdata install in dev_setup.sh --- scripts/setup/dev_setup.sh | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/scripts/setup/dev_setup.sh b/scripts/setup/dev_setup.sh index 24a2ace0f21d..919630f6a22e 100755 --- a/scripts/setup/dev_setup.sh +++ b/scripts/setup/dev_setup.sh @@ -335,6 +335,31 @@ function install_mysql_client { esac } +function install_tzdata { + PACKAGE_MANAGER=$1 + + echo "==> installing tzdata..." + + case "$PACKAGE_MANAGER" in + apt-get) + install_pkg tzdata "$PACKAGE_MANAGER" + ;; + pacman) + install_pkg tzdata "$PACKAGE_MANAGER" + ;; + apk) + install_pkg tzdata "$PACKAGE_MANAGER" + ;; + yum | dnf | brew) + install_pkg tzdata "$PACKAGE_MANAGER" + ;; + *) + echo "Unable to install tzdata with package manager: $PACKAGE_MANAGER" + exit 1 + ;; + esac +} + function install_sqlite3 { PACKAGE_MANAGER=$1 @@ -652,6 +677,7 @@ fi if [[ "$INSTALL_DEV_TOOLS" == "true" ]]; then install_mysql_client "$PACKAGE_MANAGER" + install_tzdata "$PACKAGE_MANAGER" install_pkg git "$PACKAGE_MANAGER" install_python3 "$PACKAGE_MANAGER" if [[ "$PACKAGE_MANAGER" == "apt-get" ]]; then