Skip to content

Commit

Permalink
setup for timezone (#218)
Browse files Browse the repository at this point in the history
  • Loading branch information
shunk031 authored Feb 18, 2024
1 parent eb8b067 commit d335a8a
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{{ if eq .chezmoi.os "linux" -}}
{{ if eq .chezmoi.osRelease.idLike "debian" -}}
{{ include "../install/ubuntu/common/pyenv.sh" }}
{{ if eq .system "server" -}}
{{ include "../install/ubuntu/server/setup_timezone.sh" }}
{{ end -}}
{{ include "../install/ubuntu/common/pyenv.sh" }}
{{ end -}}
{{ end -}}
19 changes: 19 additions & 0 deletions install/ubuntu/server/setup_timezone.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/usr/bin/env bash

set -Eeuo pipefail

if [ "${DOTFILES_DEBUG:-}" ]; then
set -x
fi

function main() {
export TZ="Asia/Tokyo"
ln -snf /usr/share/zoneinfo/$TZ /etc/localtime
echo $TZ > /etc/timezone

DEBIAN_FRONTEND="noninteractive" apt-get install -y tzdata
}

if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
main
fi

0 comments on commit d335a8a

Please sign in to comment.