feat: Use more cut_1 function

This commit is contained in:
zen0bit 2024-04-21 10:52:44 +02:00 committed by Martin Wimpress
parent f555b2a3d9
commit 539731820f
1 changed files with 4 additions and 4 deletions

View File

@ -2599,11 +2599,11 @@ function get_ubuntu-server() {
if wget -q --spider "${URL}/SHA256SUMS"; then
DATA=$(web_pipe "${URL}/SHA256SUMS" | grep 'live-server' | grep amd64 | grep iso)
ISO=$(cut -d'*' -f2 <<<${DATA})
HASH=$(cut -d' ' -f1 <<<${DATA})
HASH=$(cut_1 <<<${DATA})
else
DATA=$(web_pipe "${URL}/MD5SUMS" | grep 'live-server' | grep amd64 | grep iso)
ISO=$(cut -d' ' -f3 <<<${DATA})
HASH=$(cut -d' ' -f1 <<<${DATA})
HASH=$(cut_1 <<<${DATA})
fi
if [ -z $ISO ] || [ -z $HASH ]; then
echo "$(pretty_name $OS) ${RELEASE} is currently unavailable. Please select other OS/Release combination"
@ -2649,11 +2649,11 @@ function get_ubuntu() {
if wget -q --spider "${URL}/SHA256SUMS"; then
DATA=$(web_pipe "${URL}/SHA256SUMS" | grep 'desktop\|dvd\|install' | grep amd64 | grep iso | grep -v "+mac")
ISO=$(cut -d'*' -f2 <<<${DATA} | sed '1q;d')
HASH=$(cut -d' ' -f1 <<<${DATA} | sed '1q;d')
HASH=$(cut_1 <<<${DATA} | sed '1q;d')
else
DATA=$(web_pipe "${URL}/MD5SUMS" | grep 'desktop\|dvd\|install' | grep amd64 | grep iso | grep -v "+mac")
ISO=$(cut -d'*' -f2 <<<${DATA})
HASH=$(cut -d' ' -f1 <<<${DATA})
HASH=$(cut_1 <<<${DATA})
fi
if [ -z $ISO ] || [ -z $HASH ]; then
echo "$(pretty_name $OS) ${RELEASE} is currently unavailable. Please select other OS/Release combination"