#!/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" echo "running full system update ..." slackpkg upgrade slackpkg slackpkg upgrade-all slackpkg install-new cp $basedir/mirrors /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" echo "same as before, you will have to manually" echo "edit the mirror list." echo "scroll down below the 15.0 section" echo "and select a suitable -current mirror" printf "\x1b[1;31m================================================================\n\x1b[0;0m" read -p "press enter to continue" nano /etc/slackpkg/mirrors cp $basedir/slackpkg-blacklist-allowkern /etc/slackpkg/blacklist echo "running full system update ..." slackpkg update slackpkg upgrade slackpkg slackpkg install-new slackpkg upgrade-all cp $basedir/slackpkg-blacklist /etc/slackpkg/blacklist kernel=$(ls /boot | grep vmlinuz-generic | sort | tail -1 | cut -d '-' -f 2) initrdcmd=$(/usr/share/mkinitrd/mkinitrd_command_generator.sh -k $kernel | tail -1) $initrdcmd rm /boot/vmlinuz ln -s /boot/vmlinuz-generic-$kernel /boot/vmlinuz rm /boot/System.map ln -s /boot/System.map-generic-$kernel.x64 /boot/System.map rm /boot/config ln -s /boot/config-generic-$kernel.x64 /boot/config 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