[arkdep] Perform diff deployment_id check before connection check
This commit is contained in:
parent
8af1ba9183
commit
47d2286dde
1 changed files with 6 additions and 6 deletions
12
arkdep
12
arkdep
|
@ -597,6 +597,12 @@ diff () {
|
||||||
declare -r deployment_id_old=${mountinfo##*/} # Remove everything before ID
|
declare -r deployment_id_old=${mountinfo##*/} # Remove everything before ID
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Check if we are already running the latest update
|
||||||
|
if [[ $deployment_id_old == $deployment_id_new ]]; then
|
||||||
|
printf 'Already on latest version\n'
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
# Check if pkgs files actually available
|
# Check if pkgs files actually available
|
||||||
declare status_code_new=$(curl -s -o /dev/null --write-out "%{http_code}" $repo_url/$new_update_target/$deployment_id_new.pkgs)
|
declare status_code_new=$(curl -s -o /dev/null --write-out "%{http_code}" $repo_url/$new_update_target/$deployment_id_new.pkgs)
|
||||||
|
|
||||||
|
@ -615,12 +621,6 @@ diff () {
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check if we are already running the latest update
|
|
||||||
if [[ $deployment_id_old == $deployment_id_new ]]; then
|
|
||||||
printf 'Already on latest version\n'
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Get new package list
|
# Get new package list
|
||||||
mapfile new_pkgs < <(curl -s $repo_url/$new_update_target/$deployment_id_new.pkgs)
|
mapfile new_pkgs < <(curl -s $repo_url/$new_update_target/$deployment_id_new.pkgs)
|
||||||
# Get old package list
|
# Get old package list
|
||||||
|
|
Loading…
Add table
Reference in a new issue