summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIsmael Luceno2022-03-14 23:57:45 +0100
committerIsmael Luceno2022-03-14 23:58:13 +0100
commitb538c2da085b67c1a042bd8cafa466011ffcfb55 (patch)
tree91a49ad4087cec9d6e1ef6692cbfd580fbda96d0
parentb6a8a0d18f2f852056f2181bb763c06fe3c9aef1 (diff)
scribe: Fix updating from tarballs
Fixes: 878079e1d3d4 ("scribe: don't download/clone all over again when updating")
-rwxr-xr-xusr/sbin/scribe14
1 files changed, 9 insertions, 5 deletions
diff --git a/usr/sbin/scribe b/usr/sbin/scribe
index f0197ed4..59a4dbd3 100755
--- a/usr/sbin/scribe
+++ b/usr/sbin/scribe
@@ -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