added function download_and_execute_arch-config and implemented usage

This commit is contained in:
stevleibelt 2022-08-13 21:28:36 +02:00
parent 72e4a39b30
commit 6caad37fd2

27
init
View file

@ -9,10 +9,35 @@ exec &> >(tee "debug.log")
### Functions
ask () {
read -p "> $1 " -r
echo
}
print () {
echo -e "\n\033[1m> $1\033[0m"
}
download_and_execute_arch-config () {
ask "Do you want to download and execute arch-config?"
if [[ $REPLY =~ ^[Yy]$ ]]
then
if [[ ! -f /usr/bin/git ]]
then
pacman -S git --noconfirm &>/dev/null
fi
git clone https://github.com/stevleibelt/arch-config
cd arch-config/scripts/zfs/install
./01-configure.sh
./02-install.sh
fi
}
get_running_kernel_version () {
# Returns running kernel version
@ -205,6 +230,8 @@ then
modprobe zfs && echo -e "\n\e[32mZFS is ready\n"
download_and_execute_arch-config
else
print "No ZFS module found"
fi