From 5a62bc18589552848babb2bddb3676000f1debaf Mon Sep 17 00:00:00 2001 From: Takumi Sueda Date: Mon, 22 Mar 2021 20:08:42 +0900 Subject: [PATCH] Fix unset env and wrong locale --- os-brainux/setup_brainux.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/os-brainux/setup_brainux.sh b/os-brainux/setup_brainux.sh index e59c38c..6521d83 100755 --- a/os-brainux/setup_brainux.sh +++ b/os-brainux/setup_brainux.sh @@ -1,7 +1,13 @@ #!/bin/bash set -uex -o pipefail -TIMEZONE="Asia/Tokyo" +if [ ! -v TIMEZONE ]; then + TIMEZONE=Asia/Tokyo +fi + +if [ ! -v CI ]; then + CI=false +fi /debootstrap/debootstrap --second-stage @@ -32,7 +38,7 @@ apt install -y locales echo "$TIMEZONE" > /etc/timezone && \ dpkg-reconfigure -f noninteractive tzdata && \ - sed -i -e 's/# en_US.UTF-8 UTF-8/en_us.UTF-8 UTF-8/' /etc/locale.gen && \ + sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \ echo 'LANG="en_US.UTF-8"' > /etc/default/locale && \ dpkg-reconfigure -f noninteractive locales && \ update-locale LANG=en_US.UTF-8