summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Cozic <laurent@cozic.net>2016-10-01 13:44:56 +0100
committerLaurent Cozic <laurent@cozic.net>2016-10-01 13:44:56 +0100
commit56a3a89866cc3914f429c1ca1e328a34cb6fcc29 (patch)
tree504f6ea561c772117a311600767b72b4544f1e73
parentb9d359f797d67749a180b7fdae7d7a828725cc58 (diff)
Fixed issue with paths that contain spaces
-rw-r--r--README.md3
-rwxr-xr-xrsync_tmbackup.sh12
2 files changed, 8 insertions, 7 deletions
diff --git a/README.md b/README.md
index 867e4c4..886724e 100644
--- a/README.md
+++ b/README.md
@@ -62,7 +62,8 @@ To display the rsync options that are used for backup, run `./rsync_tmbackup.sh
# TODO
-* Check source and destination file-system. If one of them is FAT, use the --modify-window rsync parameter (see `man rsync`) with a value of 1 or 2.
+* Check source and destination file-system (`df -T /dest`). If one of them is FAT, use the --modify-window rsync parameter (see `man rsync`) with a value of 1 or 2
+* Add `--whole-file` arguments on Windows? See http://superuser.com/a/905415/73619
* Minor changes (see TODO comments in the source).
diff --git a/rsync_tmbackup.sh b/rsync_tmbackup.sh
index 9c2381e..900fb65 100755
--- a/rsync_tmbackup.sh
+++ b/rsync_tmbackup.sh
@@ -87,27 +87,27 @@ fn_run_cmd() {
}
fn_find() {
- fn_run_cmd "find $1" 2>/dev/null
+ fn_run_cmd "find '$1'" 2>/dev/null
}
fn_get_absolute_path() {
- fn_run_cmd "cd $1;pwd"
+ fn_run_cmd "cd '$1';pwd"
}
fn_mkdir() {
- fn_run_cmd "mkdir -p -- $1"
+ fn_run_cmd "mkdir -p -- '$1'"
}
fn_rm() {
- fn_run_cmd "rm -rf -- $1"
+ fn_run_cmd "rm -rf -- '$1'"
}
fn_touch() {
- fn_run_cmd "touch -- $1"
+ fn_run_cmd "touch -- '$1'"
}
fn_ln() {
- fn_run_cmd "ln -s -- $1 $2"
+ fn_run_cmd "ln -s -- '$1' '$2'"
}
# -----------------------------------------------------------------------------