feat: Use more cut_1 function
This commit is contained in:
parent
f555b2a3d9
commit
539731820f
8
quickget
8
quickget
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue