Browse Source

fix: [myc-install] make ``curl`` detect ``404`` errors and follow redirection if any

pull/4/head
Valentin Lab 2 years ago
parent
commit
b61626e981
  1. 2
      bin/myc-install

2
bin/myc-install

@ -85,7 +85,7 @@ export PGHOST PGUSER
EOF EOF
if ! [ -s /etc/ssh/vm_git_myceliandre_access_id_rsa ]; then if ! [ -s /etc/ssh/vm_git_myceliandre_access_id_rsa ]; then
curl https://docker.0k.io/get/vm_git_myceliandre_access_id_rsa > /etc/ssh/vm_git_myceliandre_access_id_rsa || {
curl -L --fail https://docker.0k.io/get/vm_git_myceliandre_access_id_rsa > /etc/ssh/vm_git_myceliandre_access_id_rsa || {
echo "Fatal: Could not retrieve http://docker.0k.io/get/vm_git_myceliandre_access_id_rsa ..." >&2 echo "Fatal: Could not retrieve http://docker.0k.io/get/vm_git_myceliandre_access_id_rsa ..." >&2
rm -f /etc/ssh/vm_git_myceliandre_access_id_rsa rm -f /etc/ssh/vm_git_myceliandre_access_id_rsa
exit 1 exit 1

Loading…
Cancel
Save