]> gitweb.hhaalo.de Git - simple-backup.git/commitdiff
show restore mode
authorBastian Dehn <hhaalo@arcor.de>
Sat, 24 May 2025 08:49:52 +0000 (10:49 +0200)
committerBastian Dehn <hhaalo@arcor.de>
Sat, 24 May 2025 08:49:52 +0000 (10:49 +0200)
restore

diff --git a/restore b/restore
index 04e33ced7b1f9ff208b31168152c061ca39b8afc..b37ef76bf5af961f0c0213ab604c67490877bf3b 100755 (executable)
--- a/restore
+++ b/restore
@@ -48,7 +48,11 @@ restore()
        local restore_path="$backup_root/$backup_dir/$remote_machine$path"
        local remote_path="$remote_user@$remote_machine:$path"
 
-       echo "ℹ️  HINT: restore folder must path end with slash"
+       local mode="directory"
+
+       [[ "$path" =~ /$ ]] || mode="file"
+
+       echo "ℹ️  INFO: restore mode $mode"
        echo
 
        echo "ℹ️  INFO: restore path $restore_path"