From 384bacdbe1b6ba32186944ea98afa49b24d58e8f Mon Sep 17 00:00:00 2001 From: Jesus Alvarez Date: Tue, 1 Aug 2017 22:44:41 -0700 Subject: [PATCH] scraper.sh: fix archiso checking --- lib.sh | 13 +++++++------ scraper.sh | 4 +++- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/lib.sh b/lib.sh index fdfb561..a5aec67 100644 --- a/lib.sh +++ b/lib.sh @@ -470,9 +470,12 @@ check_archiso() { # # Check archiso kernel version (this will change when the archiso is updated) # + if ! source ${script_dir}/src/kernels/archiso.sh; then + echo "!! ERROR !! -- Could not load ${script_dir}/src/kernels/archiso.sh!" + exit 155 + fi msg "Checking archiso download page for linux kernel version changes..." - check_webpage "https://www.archlinux.org/download/" "(?<=Included Kernel: )[\d\.]+" \ - "${kernel_version_archiso}" + check_webpage "https://www.archlinux.org/download/" "(?<=Included Kernel: )[\d\.]+" "${kernel_version::-2}" check_result "archiso kernel version" "archiso" "$?" } @@ -482,8 +485,7 @@ check_linux_kernel() { # Check x86_64 linux kernel version # msg "Checking the online package database for x86_64 linux kernel version changes..." - check_webpage "https://www.archlinux.org/packages/core/x86_64/linux/" "(?<=

linux )[\d\.-]+(?=

)" \ - "${kernel_version}" + check_webpage "https://www.archlinux.org/packages/core/x86_64/linux/" "(?<=

linux )[\d\.-]+(?=

)" "${kernel_version}" check_result "x86_64 linux kernel package" "linux x86_64" "$?" } @@ -493,8 +495,7 @@ check_linux_lts_kernel() { # Check x86_64 linux-lts kernel version # msg "Checking the online package database for x86_64 linux-lts kernel version changes..." - check_webpage "https://www.archlinux.org/packages/core/x86_64/linux-lts/" "(?<=

linux-lts )[\d\.-]+(?=

)" \ - "${kernel_version}" + check_webpage "https://www.archlinux.org/packages/core/x86_64/linux-lts/" "(?<=

linux-lts )[\d\.-]+(?=

)" "${kernel_version}" check_result "x86_64 linux-lts kernel package" "linux-lts x86_64" "$?" } diff --git a/scraper.sh b/scraper.sh index 541d1ad..961694f 100755 --- a/scraper.sh +++ b/scraper.sh @@ -77,7 +77,6 @@ debug_print_default_vars export script_dir mode kernel_name source_safe "${script_dir}/src/kernels/linux.sh" check_linux_kernel -# check_archiso source_safe "${script_dir}/src/kernels/linux-lts.sh" @@ -87,6 +86,9 @@ check_linux_lts_kernel check_zol_version +check_archiso + + # # This is the end # Beautiful friend