summaryrefslogtreecommitdiff
path: root/slackware-bootstrap/step2
blob: 9ac5f3f39b0a0b3394a3acd685cea4f42a33118d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#!/bin/bash
basedir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )

kernelver="6.15.2"

if [[ -f "~/.step2-done" ]]; then
  sh $basedir/step2-finish
  exit
fi

rm /root/.bash_profile

if [[ ! -f "~/.slpkg-done" ]]; then
  sh $basedir/slpkg
fi

if [[ ! -f "~/.multilib-done" ]]; then
  sh $basedir/multilib
fi

nreboot=0
if [[ ! -f "~/.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 "~/.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
  fi
fi

touch ~/.step2-done
if [[ $nreboot == 1 ]]; then
  touch ~/.nreboot
fi

sh $basedir/step2-finish