diff options
| -rw-r--r-- | slackware-bootstrap/cleanup | 11 | ||||
| -rwxr-xr-x | slackware-bootstrap/finish | 1 | ||||
| -rwxr-xr-x | slackware-bootstrap/kernel | 1 | ||||
| -rwxr-xr-x | slackware-bootstrap/multilib | 1 | ||||
| -rwxr-xr-x | slackware-bootstrap/nvidia-driver | 2 | ||||
| -rw-r--r-- | slackware-bootstrap/package-purge | 30 | ||||
| -rwxr-xr-x | slackware-bootstrap/slpkg | 1 | ||||
| -rw-r--r-- | slackware-bootstrap/step1 | 18 | ||||
| -rw-r--r-- | slackware-bootstrap/step2 | 59 | ||||
| -rw-r--r--[-rwxr-xr-x] | slackware-bootstrap/update-current (renamed from slackware-bootstrap/slackpkg) | 62 | ||||
| -rwxr-xr-x | slackware-bootstrap/update-stable | 40 |
11 files changed, 140 insertions, 86 deletions
diff --git a/slackware-bootstrap/cleanup b/slackware-bootstrap/cleanup new file mode 100644 index 0000000..7747c9d --- /dev/null +++ b/slackware-bootstrap/cleanup @@ -0,0 +1,11 @@ +#!/bin/sh + +rm ~/.step1-done +rm ~/.stable-done +rm ~/.current-done +rm ~/.purge-done +rm ~/.slpkg-done +rm ~/.multilib-done +rm ~/.kernel-done +rm ~/.nvidia-done +rm ~/.step2-done diff --git a/slackware-bootstrap/finish b/slackware-bootstrap/finish index a1a8ad6..7468739 100755 --- a/slackware-bootstrap/finish +++ b/slackware-bootstrap/finish @@ -2,6 +2,7 @@ basedir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) sh $basedir/runlevel +sh $basedir/cleanup echo "================= [ setup complete ] ====================" echo "the system will now reboot" diff --git a/slackware-bootstrap/kernel b/slackware-bootstrap/kernel index abfc29e..07775fe 100755 --- a/slackware-bootstrap/kernel +++ b/slackware-bootstrap/kernel @@ -52,3 +52,4 @@ fi popd +touch ~/.kernel-done diff --git a/slackware-bootstrap/multilib b/slackware-bootstrap/multilib index ffb7545..5485e8c 100755 --- a/slackware-bootstrap/multilib +++ b/slackware-bootstrap/multilib @@ -23,3 +23,4 @@ if [[ $iscurrent == 0 ]]; then fi cd $oldpwd +touch ~/.multilib-done diff --git a/slackware-bootstrap/nvidia-driver b/slackware-bootstrap/nvidia-driver index b899169..e1d669f 100755 --- a/slackware-bootstrap/nvidia-driver +++ b/slackware-bootstrap/nvidia-driver @@ -27,3 +27,5 @@ echo "blacklist nouveau" >> /etc/modprobe.d/BLACKLIST-nouveau.conf echo "/usr/bin/nvidia-modprobe -c 0 -u" >> /etc/rc.d/rc.local popd + +touch ~/.nvidia-done diff --git a/slackware-bootstrap/package-purge b/slackware-bootstrap/package-purge new file mode 100644 index 0000000..5f681b8 --- /dev/null +++ b/slackware-bootstrap/package-purge @@ -0,0 +1,30 @@ +#!/bin/sh +basedir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) + +echo "================= [ kde purge ] ==================" +echo "due to how install-new works, kde is always" +echo "installed during the first system update." +echo "if you would like, you can now purge the install." +echo "==================================================" + +echo "would you like to purge all kde packages now?" +read -p "enter your choice [y/n] (n): " choice +if [[ $choice == 'y' ]]; then + echo "purging kde packages ..." + slackpkg remove kde +fi + +echo "================== [ TeX packages ] ===============" +echo "similarly to kde, tex packages are always installed" +echo "during the first system update. if you would like," +echo "you can now purge the install." +echo "==================================================" + +echo "would you like to purge all tex packages now?" +read -p "enter your choice [y/n] (y): " choice +if [[ $choice == 'y' ]]; then + echo "purging tex packages ..." + slackpkg remove texlive +fi + +touch ~/.purge-done diff --git a/slackware-bootstrap/slpkg b/slackware-bootstrap/slpkg index dbed15e..b87d094 100755 --- a/slackware-bootstrap/slpkg +++ b/slackware-bootstrap/slpkg @@ -30,3 +30,4 @@ cp -f $basedir/slpkg.toml /etc/slpkg/slpkg.toml slpkg -u cd $oldpwd +touch ~/.slpkg-done diff --git a/slackware-bootstrap/step1 b/slackware-bootstrap/step1 index 8085554..d48abac 100644 --- a/slackware-bootstrap/step1 +++ b/slackware-bootstrap/step1 @@ -1,9 +1,25 @@ #!/bin/bash basedir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) -sh $basedir/slackpkg +if [[ -f "~/.step1-done" ]]; then + sh $basedir/step2 + exit +fi + +if [[ ! -f "~/.stable-done" ]]; then + sh $basedir/update-stable +fi + +if [[ ! -f "~/.current-done" ]]; then + sh $basedir/update-current +fi + +if [[ ! -f "~/.purge-done" ]]; then + sh $basedir/package-purge +fi echo "sh $basedir/step2" >> /root/.bash_profile +touch ~/.step1-done echo "=================== [ system reboot ] ==================" printf "\x1b[1;31mREAD CAREFULLY:\033[0m\n" diff --git a/slackware-bootstrap/step2 b/slackware-bootstrap/step2 index ffc4b1d..2598cf7 100644 --- a/slackware-bootstrap/step2 +++ b/slackware-bootstrap/step2 @@ -5,39 +5,49 @@ kernelver="6.15.2" rm /root/.bash_profile -sh $basedir/slpkg -sh $basedir/multilib +if [[ ! -f "~/.slpkg-done" ]]; then + sh $basedir/slpkg +fi + +if [[ ! -f "~/.multilib-done" ]]; then + sh $basedir/multilib +fi -echo "============== [ kernel update ] ===============" -echo "you can choose to update your kernel" -echo "after system reboot." -echo "this will update your kernel to $kernelver" -echo "================================================" +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 "================================================" -nreboot=0 + nreboot=0 -read -p "do you want to update your kernel [y/n]? (y):" choice -if [[ $choice == "y" ]]; then - nreboot=1 - sh $basedir/kernel + read -p "do you want to update your kernel [y/n]? (y):" choice + if [[ $choice == "y" ]]; then + nreboot=1 + sh $basedir/kernel + fi fi -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 +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 echo "sh $basedir/finish" >> /root/.bash_profile - echo "rm -f /root/.bashrc" >> /root/.bash_profile + echo "rm -f /root/.bash_profile" >> /root/.bash_profile echo "============================ [ reboot ] ===========================" printf "\x1b[1;31mupon reboot, make sure to log in as ROOT first !!!\x1b[0;0m\n" echo "===================================================================" @@ -46,6 +56,7 @@ if [[ $nreboot == 1 ]]; then reboot else sh $basedir/runlevel + sh $basedir/cleanup echo "============== [ setup done ] ===============" echo "username: $username" diff --git a/slackware-bootstrap/slackpkg b/slackware-bootstrap/update-current index 5333f9b..a0e07fa 100755..100644 --- a/slackware-bootstrap/slackpkg +++ b/slackware-bootstrap/update-current @@ -1,42 +1,6 @@ #!/bin/sh basedir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) -cp /etc/slackpkg/mirrors $basedir/.mirrors-old - -printf "\x1b[1;31m======================= [ \x1b[7;31m ATTENTION \x1b[0;0m\x1b[1;31m ] ========================\n\x1b[0;0m" -printf "\x1b[16;32mREAD CAREFULLY:\n\x1b[0;0m" -echo "this script will open a text editor to edit the mirror list" -echo "for the package manager." -echo "please uncomment a mirror from a location near you," -echo "by removing the '#' from the beginning of the line." -printf "\x1b[16;32mONLY CHOOSE ONE MIRROR !\n\x1b[0;0m" -printf "\x1b[16;32mDO NOT CHOOSE A -CURRENT MIRROR NOW !\n\x1b[0;0m" -echo "you can save the file by pressing ctrl+x." - -printf "\x1b[1;31m================================================================\n\x1b[0;0m" - -read -p "press enter to continue" -nano /etc/slackpkg/mirrors - -echo "running slackpkg update ..." -slackpkg update -slackpkg update gpg - -echo "============== [ system update ] ===============" -echo "simply press OK on the package selection screen" -echo "================================================" - -read -p "press enter to continue" -printf "\x1b[1;31m======================= [ \x1b[7;31m ATTENTION \x1b[0;0m\x1b[1;31m ] ========================\n\x1b[0;0m" -echo "updating slackpkg, if prompted to overwrite configuration files" -echo "pick 'Remove (R)' !!!!" -slackpkg upgrade slackpkg -echo "==== [ updating system... ] ====" -slackpkg upgrade-all -slackpkg install-new - -cp -f $basedir/.mirrors-old /etc/slackpkg/mirrors - printf "\x1b[1;31m======================= [ \x1b[7;31m ATTENTION \x1b[0;0m\x1b[1;31m ] ========================\n\x1b[0;0m" printf "\x1b[16;32mREAD CAREFULLY:\n\x1b[0;0m" echo "you will now have to switch the branch to -current" @@ -114,28 +78,4 @@ else ln -s /boot/config-$kernel.x64 /boot/config fi -echo "================= [ kde purge ] ==================" -echo "due to how install-new works, kde is always" -echo "installed during the first system update." -echo "if you would like, you can now purge the install." -echo "==================================================" - -echo "would you like to purge all kde packages now?" -read -p "enter your choice [y/n] (n): " choice -if [[ $choice == 'y' ]]; then - echo "purging kde packages ..." - slackpkg remove kde -fi - -echo "================== [ TeX packages ] ===============" -echo "similarly to kde, tex packages are always installed" -echo "during the first system update. if you would like," -echo "you can now purge the install." -echo "==================================================" - -echo "would you like to purge all tex packages now?" -read -p "enter your choice [y/n] (y): " choice -if [[ $choice == 'y' ]]; then - echo "purging tex packages ..." - slackpkg remove texlive -fi +touch ~/.current-done diff --git a/slackware-bootstrap/update-stable b/slackware-bootstrap/update-stable new file mode 100755 index 0000000..5d4667e --- /dev/null +++ b/slackware-bootstrap/update-stable @@ -0,0 +1,40 @@ +#!/bin/sh +basedir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) + +cp /etc/slackpkg/mirrors $basedir/.mirrors-old + +printf "\x1b[1;31m======================= [ \x1b[7;31m ATTENTION \x1b[0;0m\x1b[1;31m ] ========================\n\x1b[0;0m" +printf "\x1b[16;32mREAD CAREFULLY:\n\x1b[0;0m" +echo "this script will open a text editor to edit the mirror list" +echo "for the package manager." +echo "please uncomment a mirror from a location near you," +echo "by removing the '#' from the beginning of the line." +printf "\x1b[16;32mONLY CHOOSE ONE MIRROR !\n\x1b[0;0m" +printf "\x1b[16;32mDO NOT CHOOSE A -CURRENT MIRROR NOW !\n\x1b[0;0m" +echo "you can save the file by pressing ctrl+x." + +printf "\x1b[1;31m================================================================\n\x1b[0;0m" + +read -p "press enter to continue" +nano /etc/slackpkg/mirrors + +echo "running slackpkg update ..." +slackpkg update +slackpkg update gpg + +printf "\x1b[1;31m======================= [ \x1b[7;31m ATTENTION \x1b[0;0m\x1b[1;31m ] ========================\n\x1b[0;0m" +echo "updating slackpkg, if prompted to overwrite configuration files" +echo "pick 'Remove (R)' !!!!" +slackpkg upgrade slackpkg + +echo "============== [ system update ] ===============" +echo "simply press OK on the package selection screen" +echo "================================================" +read -p "press enter to continue" + +echo "==== [ updating system... ] ====" +slackpkg upgrade-all +slackpkg install-new + +cp -f $basedir/.mirrors-old /etc/slackpkg/mirrors +touch ~/.stable-done |
