Cleanup
This commit is contained in:
parent
3c22bbbeb6
commit
c25baaf9a9
@ -293,7 +293,7 @@ check_swan_ver() {
|
||||
swan_ver_url="https://dl.ls20.com/v1/docker/$os_type/$os_arch/swanverikev2?ver=$swan_ver&auto=$use_defaults"
|
||||
fi
|
||||
[ "$1" != "0" ] && swan_ver_url="$swan_ver_url&e=$2"
|
||||
swan_ver_latest=$(wget -t 3 -T 15 -qO- "$swan_ver_url")
|
||||
swan_ver_latest=$(wget -t 3 -T 15 -qO- "$swan_ver_url" | head -n 1)
|
||||
}
|
||||
|
||||
show_update_info() {
|
||||
|
@ -278,7 +278,7 @@ check_swan_ver() {
|
||||
swan_ver_cur=4.5
|
||||
swan_ver_url="https://dl.ls20.com/v1/$os_type/$os_ver/swanverupg?arch=$os_arch&ver1=$swan_ver_old&ver2=$SWAN_VER"
|
||||
[ "$1" != "0" ] && swan_ver_url="$swan_ver_url&e=$2"
|
||||
swan_ver_latest=$(wget -t 3 -T 15 -qO- "$swan_ver_url")
|
||||
swan_ver_latest=$(wget -t 3 -T 15 -qO- "$swan_ver_url" | head -n 1)
|
||||
if printf '%s' "$swan_ver_latest" | grep -Eq '^([3-9]|[1-9][0-9]{1,2})(\.([0-9]|[1-9][0-9]{1,2})){1,2}$' \
|
||||
&& [ "$1" = "0" ] && [ "$swan_ver_cur" != "$swan_ver_latest" ] \
|
||||
&& printf '%s\n%s' "$swan_ver_cur" "$swan_ver_latest" | sort -C -V; then
|
||||
|
@ -261,7 +261,7 @@ check_swan_ver() {
|
||||
swan_ver_cur=4.5
|
||||
swan_ver_url="https://dl.ls20.com/v1/amzn/2/swanverupg?arch=$os_arch&ver1=$swan_ver_old&ver2=$SWAN_VER"
|
||||
[ "$1" != "0" ] && swan_ver_url="$swan_ver_url&e=$2"
|
||||
swan_ver_latest=$(wget -t 3 -T 15 -qO- "$swan_ver_url")
|
||||
swan_ver_latest=$(wget -t 3 -T 15 -qO- "$swan_ver_url" | head -n 1)
|
||||
if printf '%s' "$swan_ver_latest" | grep -Eq '^([3-9]|[1-9][0-9]{1,2})(\.([0-9]|[1-9][0-9]{1,2})){1,2}$' \
|
||||
&& [ "$1" = "0" ] && [ "$swan_ver_cur" != "$swan_ver_latest" ] \
|
||||
&& printf '%s\n%s' "$swan_ver_cur" "$swan_ver_latest" | sort -C -V; then
|
||||
|
@ -297,7 +297,7 @@ check_swan_ver() {
|
||||
swan_ver_cur=4.5
|
||||
swan_ver_url="https://dl.ls20.com/v1/$os_type/$os_ver/swanverupg?arch=$os_arch&ver1=$swan_ver_old&ver2=$SWAN_VER"
|
||||
[ "$1" != "0" ] && swan_ver_url="$swan_ver_url&e=$2"
|
||||
swan_ver_latest=$(wget -t 3 -T 15 -qO- "$swan_ver_url")
|
||||
swan_ver_latest=$(wget -t 3 -T 15 -qO- "$swan_ver_url" | head -n 1)
|
||||
if printf '%s' "$swan_ver_latest" | grep -Eq '^([3-9]|[1-9][0-9]{1,2})(\.([0-9]|[1-9][0-9]{1,2})){1,2}$' \
|
||||
&& [ "$1" = "0" ] && [ "$swan_ver_cur" != "$swan_ver_latest" ] \
|
||||
&& printf '%s\n%s' "$swan_ver_cur" "$swan_ver_latest" | sort -C -V; then
|
||||
|
@ -304,7 +304,7 @@ check_swan_ver() {
|
||||
swan_ver_cur=4.5
|
||||
swan_ver_url="https://dl.ls20.com/v1/$os_type/$os_ver/swanverupg?arch=$os_arch&ver1=$swan_ver_old&ver2=$SWAN_VER"
|
||||
[ "$1" != "0" ] && swan_ver_url="$swan_ver_url&e=$2"
|
||||
swan_ver_latest=$(wget -t 3 -T 15 -qO- "$swan_ver_url")
|
||||
swan_ver_latest=$(wget -t 3 -T 15 -qO- "$swan_ver_url" | head -n 1)
|
||||
if printf '%s' "$swan_ver_latest" | grep -Eq '^([3-9]|[1-9][0-9]{1,2})(\.([0-9]|[1-9][0-9]{1,2})){1,2}$' \
|
||||
&& [ "$1" = "0" ] && [ "$swan_ver_cur" != "$swan_ver_latest" ] \
|
||||
&& printf '%s\n%s' "$swan_ver_cur" "$swan_ver_latest" | sort -C -V; then
|
||||
|
@ -506,7 +506,7 @@ EOF
|
||||
check_swan_ver() {
|
||||
swan_ver_url="https://dl.ls20.com/v1/$os_type/$os_ver/swanver?arch=$os_arch&ver=$SWAN_VER"
|
||||
[ "$1" != "0" ] && swan_ver_url="$swan_ver_url&e=$2"
|
||||
swan_ver_latest=$(wget -t 3 -T 15 -qO- "$swan_ver_url")
|
||||
swan_ver_latest=$(wget -t 3 -T 15 -qO- "$swan_ver_url" | head -n 1)
|
||||
if printf '%s' "$swan_ver_latest" | grep -Eq '^([3-9]|[1-9][0-9]{1,2})(\.([0-9]|[1-9][0-9]{1,2})){1,2}$' \
|
||||
&& [ "$1" = "0" ] && [ -n "$SWAN_VER" ] && [ "$SWAN_VER" != "$swan_ver_latest" ] \
|
||||
&& printf '%s\n%s' "$SWAN_VER" "$swan_ver_latest" | sort -C -V; then
|
||||
|
@ -513,7 +513,7 @@ EOF
|
||||
check_swan_ver() {
|
||||
swan_ver_url="https://dl.ls20.com/v1/amzn/2/swanver?arch=$os_arch&ver=$SWAN_VER"
|
||||
[ "$1" != "0" ] && swan_ver_url="$swan_ver_url&e=$2"
|
||||
swan_ver_latest=$(wget -t 3 -T 15 -qO- "$swan_ver_url")
|
||||
swan_ver_latest=$(wget -t 3 -T 15 -qO- "$swan_ver_url" | head -n 1)
|
||||
if printf '%s' "$swan_ver_latest" | grep -Eq '^([3-9]|[1-9][0-9]{1,2})(\.([0-9]|[1-9][0-9]{1,2})){1,2}$' \
|
||||
&& [ "$1" = "0" ] && [ -n "$SWAN_VER" ] && [ "$SWAN_VER" != "$swan_ver_latest" ] \
|
||||
&& printf '%s\n%s' "$SWAN_VER" "$swan_ver_latest" | sort -C -V; then
|
||||
|
@ -609,7 +609,7 @@ EOF
|
||||
check_swan_ver() {
|
||||
swan_ver_url="https://dl.ls20.com/v1/$os_type/$os_ver/swanver?arch=$os_arch&ver=$SWAN_VER"
|
||||
[ "$1" != "0" ] && swan_ver_url="$swan_ver_url&e=$2"
|
||||
swan_ver_latest=$(wget -t 3 -T 15 -qO- "$swan_ver_url")
|
||||
swan_ver_latest=$(wget -t 3 -T 15 -qO- "$swan_ver_url" | head -n 1)
|
||||
if printf '%s' "$swan_ver_latest" | grep -Eq '^([3-9]|[1-9][0-9]{1,2})(\.([0-9]|[1-9][0-9]{1,2})){1,2}$' \
|
||||
&& [ "$1" = "0" ] && [ -n "$SWAN_VER" ] && [ "$SWAN_VER" != "$swan_ver_latest" ] \
|
||||
&& printf '%s\n%s' "$SWAN_VER" "$swan_ver_latest" | sort -C -V; then
|
||||
|
@ -597,7 +597,7 @@ EOF
|
||||
check_swan_ver() {
|
||||
swan_ver_url="https://dl.ls20.com/v1/$os_type/$os_ver/swanver?arch=$os_arch&ver=$SWAN_VER"
|
||||
[ "$1" != "0" ] && swan_ver_url="$swan_ver_url&e=$2"
|
||||
swan_ver_latest=$(wget -t 3 -T 15 -qO- "$swan_ver_url")
|
||||
swan_ver_latest=$(wget -t 3 -T 15 -qO- "$swan_ver_url" | head -n 1)
|
||||
if printf '%s' "$swan_ver_latest" | grep -Eq '^([3-9]|[1-9][0-9]{1,2})(\.([0-9]|[1-9][0-9]{1,2})){1,2}$' \
|
||||
&& [ "$1" = "0" ] && [ -n "$SWAN_VER" ] && [ "$SWAN_VER" != "$swan_ver_latest" ] \
|
||||
&& printf '%s\n%s' "$SWAN_VER" "$swan_ver_latest" | sort -C -V; then
|
||||
|
Loading…
Reference in New Issue
Block a user