diff --git a/install/initial/initial.sh b/install/initial/initial.sh index 0324acd..ba4245f 100644 --- a/install/initial/initial.sh +++ b/install/initial/initial.sh @@ -42,7 +42,7 @@ function install_zsh () { function setup_swapfile () { printf "Swapfile setup\n" printf "Please enter swapfile capacity (example : ~ M)\n" - read swapcap + read -r swapcap if [ "$1" == "btrfs" ]; then sudo truncate -s 0 /swapfile sudo chattr +C /swapfile @@ -73,13 +73,13 @@ function setup_time () { function install_yay () { printf "AUR setup (yay)\n" - cd "$HOME"/Temp + cd "$HOME"/Temp || exit sudo pacman -Sy sudo pacman -S --noconfirm git git clone https://aur.archlinux.org/yay.git - cd yay + cd yay || exit makepkg -si - cd "$HOME" + cd "$HOME" || exit } function install_fonts () { @@ -87,12 +87,19 @@ function install_fonts () { sudo pacman -S --noconfirm noto-fonts noto-fonts-cjk noto-fonts-emoji noto-fonts-extra } +function install_ca () { + printf "Install CA\n" + cd "$HOME"/Temp || exit + curl -OLk https://192.168.1.64:8443/www/suti7/tx1310m3_CA.pem + sudo trust anchor ./tx1310m3_CA.pem +} + printf "Do you want to the initial setup? (yes or no)\n" -read temp +read -r temp if [ "$temp" == "yes" ]; then printf "What is the file system of the root directory? (ext4 or btrfs)\n" - read filesystem + read -r filesystem if [ "$filesystem" == "btrfs" ]; then setup_swapfile btrfs @@ -105,6 +112,7 @@ if [ "$temp" == "yes" ]; then install_fonts install_yay install_zsh + install_ca printf "Finished.\n" else