install_dir="alter"
usershell="/bin/bash"
debug=false
+timezone="UTC"
# Parse arguments
-while getopts 'p:bt:k:rxu:o:i:s:da:g:' arg; do
+while getopts 'p:bt:k:rxu:o:i:s:da:g:z:' arg; do
case "${arg}" in
p) password="${OPTARG}" ;;
b) boot_splash=true ;;
x) debug=true; set -xv ;;
a) arch="${OPTARG}" ;;
g) language="${OPTARG}" ;;
+ z) timezone="${OPTARG}" ;;
esac
done
install_dir="alter"
usershell="/bin/bash"
debug=false
+timezone="UTC"
# Parse arguments
-while getopts 'p:bt:k:rxu:o:i:s:da:g:' arg; do
+while getopts 'p:bt:k:rxu:o:i:s:da:g:z:' arg; do
case "${arg}" in
p) password="${OPTARG}" ;;
b) boot_splash=true ;;
x) debug=true; set -xv ;;
a) arch="${OPTARG}" ;;
g) language="${OPTARG}" ;;
+ z) timezone="${OPTARG}" ;;
esac
done
install_dir="alter"
usershell="/bin/bash"
debug=false
+timezone="UTC"
# Parse arguments
-while getopts 'p:bt:k:rxu:o:i:s:da:g:' arg; do
+while getopts 'p:bt:k:rxu:o:i:s:da:g:z:' arg; do
case "${arg}" in
p) password="${OPTARG}" ;;
b) boot_splash=true ;;
x) debug=true; set -xv ;;
a) arch="${OPTARG}" ;;
g) language="${OPTARG}" ;;
+ z) timezone="${OPTARG}" ;;
esac
done
install_dir="alter"
usershell="/bin/bash"
debug=false
+timezone="UTC"
# Parse arguments
-while getopts 'p:bt:k:rxu:o:i:s:da:g:' arg; do
+while getopts 'p:bt:k:rxu:o:i:s:da:g:z:' arg; do
case "${arg}" in
p) password="${OPTARG}" ;;
b) boot_splash=true ;;
x) debug=true; set -xv ;;
a) arch="${OPTARG}" ;;
g) language="${OPTARG}" ;;
+ z) timezone="${OPTARG}" ;;
esac
done
check_bool boot_splash
check_bool rebuild
-check_bool japanese
# Delete file only if file exists
# Enable and generate languages.
sed -i 's/#\(en_US\.UTF-8\)/\1/' /etc/locale.gen
-if [[ ${japanese} = true ]]; then
+if [[ "${language}" = "ja" ]]; then
sed -i 's/#\(ja_JP\.UTF-8\)/\1/' /etc/locale.gen
fi
locale-gen
# Setting the time zone.
-if [[ ${japanese} = true ]]; then
- ln -sf /usr/share/zoneinfo/Asia/Tokyo /etc/localtime
-else
- ln -sf /usr/share/zoneinfo/UTC /etc/localtime
-fi
+ln -sf /usr/share/zoneinfo/${timezone} /etc/localtime
# Set os name
# Japanese
-if [[ ${japanese} = true ]]; then
+if [[ "${language}" = "ja" ]]; then
# Change the language to Japanese.
remove /etc/locale.conf
install_dir="alter"
usershell="/bin/bash"
debug=false
+timezone="UTC"
# Parse arguments
-while getopts 'p:bt:k:rxu:o:i:s:da:g:' arg; do
+while getopts 'p:bt:k:rxu:o:i:s:da:g:z:' arg; do
case "${arg}" in
p) password="${OPTARG}" ;;
b) boot_splash=true ;;
x) debug=true; set -xv ;;
a) arch="${OPTARG}" ;;
g) language="${OPTARG}" ;;
+ z) timezone="${OPTARG}" ;;
esac
done