Update upgrade script

This commit is contained in:
JeremyStar™ 2024-12-05 15:12:22 +01:00
parent d156a5c849
commit d9caba7166
Signed by untrusted user: JeremyStarTM
GPG key ID: E366BAEF67E4704D

View file

@ -1,14 +1,14 @@
#!/bin/bash #!/usr/bin/env bash
_5_2_2_2_changes() { function _5_2_2_2_changes() {
echo ":: A new command line option was added: add page_alloc.shuffle=1" echo ":: Update 5.2.2-2: A new command line option was added: add page_alloc.shuffle=1"
} }
_5_2_9_6_changes() { function _5_2_9_6_changes() {
echo ":: Microcode is no longer builtin. See https://wiki.archlinux.org/index.php/Microcode" echo ":: Update 5.2.9-6: Microcode is no longer builtin. See https://wiki.archlinux.org/index.php/Microcode"
} }
post_install() { function post_install() {
echo ":: Clear Linux bundles a custom command line which must be applied manually on other distributions." echo ":: Clear Linux bundles a custom command line which must be applied manually on other distributions."
echo " This is their default command line:" echo " This is their default command line:"
echo " quiet console=tty0 console=ttyS0,115200n8 cryptomgr.notests initcall_debug" echo " quiet console=tty0 console=ttyS0,115200n8 cryptomgr.notests initcall_debug"
@ -17,15 +17,13 @@ post_install() {
echo " rootfstype=ext4,btrfs,xfs,f2fs tsc=reliable rw" echo " rootfstype=ext4,btrfs,xfs,f2fs tsc=reliable rw"
} }
post_upgrade() { function post_upgrade() {
local v upgrades=( local version upgrades=(
5.2.2-2 5.2.2-2
5.2.9-6 5.2.9-6
) )
for v in "${upgrades[@]}"; do for version in "${upgrades[@]}"; do
if [[ $(vercmp "${v}" "$2") -eq 1 ]]; then [[ $(vercmp "${version}" "$2") -eq 1 ]] && "_${version//[.-]/_}_changes"
"_${v//[.-]/_}_changes"
fi
done done
} }