feat(preset):add preset for quick installlation

check var exist before ask

remove var

add preset file

add a question to check should use preset

patch custom question

fix blacklist nouveau name not clear

fix input group var not clear

fix pokemon var not clear

add comment for preset var

use preset env var before excute script

add preset to script

print preset info
This commit is contained in:
PostCyberPunk
2024-01-04 20:28:31 +08:00
parent 9c80e88985
commit 33f538966f
8 changed files with 116 additions and 25 deletions

View File

@@ -1,6 +1,9 @@
#!/bin/bash
# 💫 https://github.com/JaKooLit 💫 #
# Nvidia Stuffs #
if [[ $USE_PRESET = [Yy] ]]; then
source ./preset.sh
fi
nvidia_pkg=(
nvidia-dkms
@@ -93,9 +96,11 @@ else
fi
# Blacklist nouveau
read -n1 -rep "${CAT} Would you like to blacklist nouveau? (y/n)" response
if [[ -z $blacklist_nouveau ]]; then
read -n1 -rep "${CAT} Would you like to blacklist nouveau? (y/n)" blacklist_nouveau
fi
echo
if [[ $response =~ ^[Yy]$ ]]; then
if [[ $blacklist_nouveau =~ ^[Yy]$ ]]; then
NOUVEAU="/etc/modprobe.d/nouveau.conf"
if [ -f "$NOUVEAU" ]; then
printf "${OK} Seems like nouveau is already blacklisted..moving on.\n"