pez-infra/ansible/dotfiles/install-scripts/07-last-touches.sh
Rasmus Wejlgaard 737d6e0bc1 initial commit
2026-03-28 12:39:41 +00:00

29 lines
No EOL
707 B
Bash
Executable file

#!/bin/bash
# ensure fish is in shells
if ! grep -q "$(which fish)" /etc/shells; then
echo "$(which fish)" | sudo tee -a /etc/shells
fi
# change shell to fish
if ! [ "$(basename $SHELL)" == "fish" ]; then
chsh -s $(which fish)
fi
# create local bin directory
mkdir -p ~/bin
# Gentoo specific kernel script
if [ -f /etc/gentoo-release ]; then
init_system=openrc
echo "Gentoo detected, need clarification on which init system is used."
echo -e "Which init system?\n\n1> openrc\n2> systemd"
read -p "[1]/2: " -n 1;
echo
if [ "$REPLY" == "2" ]; then
init_system=systemd
fi
sudo cp scripts/gentoo-kernel-upgrade-$init_system /usr/bin/gentoo-kernel-upgrade
fi