#!/bin/bash basedir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) kernelver="6.15.2" if [[ -f "$HOME/.step2-done" ]]; then sh $basedir/step2-finish exit fi rm /root/.bash_profile if [[ ! -f "$HOME/.slpkg-done" ]]; then sh $basedir/slpkg fi if [[ ! -f "$HOME/.multilib-done" ]]; then sh $basedir/multilib fi nreboot=0 if [[ ! -f "$HOME/.kernel-done" ]]; then echo "============== [ kernel update ] ===============" echo "you can choose to update your kernel" echo "after system reboot." echo "this will update your kernel to $kernelver" echo "================================================" read -p "do you want to update your kernel [y/n]? (y):" choice if [[ $choice == "y" ]]; then nreboot=1 sh $basedir/kernel fi fi if [[ ! -f "$HOME/.nvidia-done" ]]; then echo "================= [ nvidia driver ] =================" echo "you can choose to install the nvidia driver" echo "after system reboot." echo "this will install the nvidia kernel module and the" echo "gpu driver." echo "=====================================================" read -p "do you want to install the nvidia driver [y/n]? (y):" choice if [[ $choice == "y" ]]; then nreboot=1 sh $basedir/nvidia-driver fi fi touch ~/.step2-done if [[ $nreboot == 1 ]]; then touch ~/.nreboot fi sh $basedir/step2-finish