~sourcemage/sorcery

b538c2da085b67c1a042bd8cafa466011ffcfb55 — Ismael Luceno 2 years ago b6a8a0d
scribe: Fix updating from tarballs

Fixes: 878079e1d3d4 ("scribe: don't download/clone all over again when updating")
1 files changed, 9 insertions(+), 5 deletions(-)

M usr/sbin/scribe
M usr/sbin/scribe => usr/sbin/scribe +9 -5
@@ 281,11 281,15 @@ scribe_add_update_worker() {

  # download it
  local scribe_target scribe_type
  if [[ $add_or_update == update ]]; then
    url_download "$grim_name" "$from" "" scribe_target scribe_type
  else
    url_download "$grim_target" "$from" "" scribe_target scribe_type
  fi
  case "$add_or_update:$from" in
    # Special case to avoid re-downloading git repos
    (update:git*)
      url_download "$grim_name" "$from" "" scribe_target scribe_type
      ;;
    (*)
      url_download "$grim_target" "$from" "" scribe_target scribe_type
      ;;
  esac

  #check the success of the download
  if [ $? != 0 ]; then