#!/bin/bash set -eo pipefail # apt sudo cp /etc/apt/sources.list{,.bak} cat <<'EOB' | sudo tee /etc/apt/sources.list >/dev/null deb http://ftp.jaist.ac.jp/raspbian buster main contrib non-free rpi deb-src http://ftp.jaist.ac.jp/raspbian buster main contrib non-free rpi EOB sudo apt-get --yes update # ntp sudo cp /etc/systemd/timesyncd.conf{,.bak} cat <<'EOB' | sudo tee /etc/systemd/timesyncd.conf >/dev/null NTP=ntp.nict.jp FallbackNTP=pool.ntp.org EOB if timedatectl list-timezones | grep 'Asia/Tokyo' >/dev/null 2>&1 then sudo timedatectl set-timezone Asia/Tokyo fi