style: fix indentation

This commit is contained in:
zen0bit 2024-04-16 17:57:47 +02:00 committed by Martin Wimpress
parent f0fb2c8f6f
commit f40a90772b
1 changed files with 220 additions and 224 deletions

View File

@ -289,6 +289,7 @@ function validate_release() {
local DISPLAY_NAME="" local DISPLAY_NAME=""
local RELEASE_GENERATOR="" local RELEASE_GENERATOR=""
local RELEASES="" local RELEASES=""
DISPLAY_NAME="$(pretty_name "${OS}")" DISPLAY_NAME="$(pretty_name "${OS}")"
case ${OS} in case ${OS} in
*ubuntu-server*) RELEASE_GENERATOR="releases_ubuntu-server";; *ubuntu-server*) RELEASE_GENERATOR="releases_ubuntu-server";;
@ -307,7 +308,7 @@ function list_json() {
function list_csv() { function list_csv() {
local DISPLAY_NAME local DISPLAY_NAME
local DL="wget" local DL=""
local DOWNLOADER local DOWNLOADER
local FUNC local FUNC
local OPTION local OPTION
@ -486,7 +487,6 @@ test_isos() {
else else
echo "ERROR - ${OS} ${RELEASE} ${OPTION} ${URL}" echo "ERROR - ${OS} ${RELEASE} ${OPTION} ${URL}"
fi fi
done done
done done
exit 0 exit 0
@ -1251,7 +1251,7 @@ function releases_truenas() {
echo "ERROR! The supported TrueNAS OS values are truenas-core or truenas-scale" echo "ERROR! The supported TrueNAS OS values are truenas-core or truenas-scale"
exit 1; exit 1;
fi fi
} }
function releases_truenas-core() { function releases_truenas-core() {
echo 13.0 12.0 echo 13.0 12.0
@ -1827,13 +1827,10 @@ function get_athenaos() {
rolling) rolling)
ISO="athena-rolling-x86_64.iso" ISO="athena-rolling-x86_64.iso"
URL="https://sourceforge.net/projects/athena-iso/files/rolling" URL="https://sourceforge.net/projects/athena-iso/files/rolling"
HASH=$(wget -q -O- "${URL}/${ISO}.md5" | cut -d' ' -f1)
;; ;;
*) *)
ISO="athena-20${RELEASE}-x86_64.iso" ISO="athena-20${RELEASE}-x86_64.iso"
URL="https://sourceforge.net/projects/athena-iso/files/v${RELEASE}" URL="https://sourceforge.net/projects/athena-iso/files/v${RELEASE}"
HASH=$(wget -q -O- 'https://sourceforge.net/projects/athena-iso/rss?path=/' | grep '.iso/download"' | grep "${RELEASE}" | cut -d '=' -f7 | cut -d'>' -f2 | cut -d'<' -f1)
;;
esac esac
echo "${URL}/${ISO} ${HASH}" echo "${URL}/${ISO} ${HASH}"
} }
@ -2753,18 +2750,17 @@ function get_slax() {
local HASH="" local HASH=""
local ISO="" local ISO=""
local URL="" local URL=""
case ${EDITION} in case ${EDITION} in
debian) URL="https://ftp.fi.muni.cz/pub/linux/slax/Slax-12.x" debian)
URL="https://ftp.fi.muni.cz/pub/linux/slax/Slax-12.x"
ISO=$(wget -q -O- "${URL}/md5.txt" | grep '64bit-' | cut -d' ' -f3 | tail -n1) ISO=$(wget -q -O- "${URL}/md5.txt" | grep '64bit-' | cut -d' ' -f3 | tail -n1)
HASH=$(wget -q -O- "${URL}/md5.txt" | grep '64bit-' | cut -d' ' -f1 | tail -n1)
;; ;;
slackware) URL="https://ftp.fi.muni.cz/pub/linux/slax/Slax-15.x" slackware)
URL="https://ftp.fi.muni.cz/pub/linux/slax/Slax-15.x"
ISO=$(wget -q -O- "${URL}/md5.txt" | grep '64bit-' | cut -d' ' -f3 | tail -n1) ISO=$(wget -q -O- "${URL}/md5.txt" | grep '64bit-' | cut -d' ' -f3 | tail -n1)
HASH=$(wget -q -O- "${URL}/md5.txt" | grep '64bit-' | cut -d' ' -f1 | tail -n1)
;; ;;
esac esac
HASH=$(wget -q -O- "${URL}/md5.txt" | grep '64bit-' | cut -d' ' -f1 | tail -n1)
echo "${URL}/${ISO} ${HASH}" echo "${URL}/${ISO} ${HASH}"
} }
@ -3379,7 +3375,7 @@ handle_curl_error() {
# This is when accounting for all possible errors in the curl manual assuming a correctly formed curl command and an HTTP(S) request, using only the curl features we're using, and a sane build # This is when accounting for all possible errors in the curl manual assuming a correctly formed curl command and an HTTP(S) request, using only the curl features we're using, and a sane build
echo "Miscellaneous server or network error!" echo "Miscellaneous server or network error!"
;; ;;
126 | 127) 126 | 127 )
echo "Curl command not found! Please install curl and try again. Exiting..." echo "Curl command not found! Please install curl and try again. Exiting..."
return "$fatal_error_action" return "$fatal_error_action"
;; ;;
@ -3392,7 +3388,7 @@ handle_curl_error() {
echo "Curl was interrupted!" echo "Curl was interrupted!"
;; ;;
# There could be other signals but these are most common # There could be other signals but these are most common
SEGV | ABRT) SEGV | ABRT )
echo "Curl crashed! Failed exploitation attempt? Please report any core dumps to curl developers. Exiting..." echo "Curl crashed! Failed exploitation attempt? Please report any core dumps to curl developers. Exiting..."
return "$fatal_error_action" return "$fatal_error_action"
;; ;;