1
0
Files
dotfiles/home/run_onchange_before_archlinux.sh.tmpl

33 lines
629 B
Bash

#!/bin/bash
{{ if false -}}
echo "This script must be run in Arch Linux"
exit 1
{{ end -}}
set -eu
{{ if ne .chezmoi.osRelease.id "arch" -}}
echo "You're not running Arch Linux. Skipping..."
exit 0
{{ end -}}
while true; do
read -p "Do you want to run the Arch Linux configuration script? [Y/n] " REPLY
# Treat an empty response as the default "Y"
REPLY=${REPLY:-Y}
case "$REPLY" in
y|Y) break ;;
n|N) exit 0 ;;
*) echo "Unrecognized option. Please answer Y or n." ;;
esac
done
set -x
# Install the Fish shell
sudo pacman --noconfirm -S fish
sudo chsh -s "$(which fish)" $USER