summaryrefslogtreecommitdiff
path: root/rsync_tmbackup.sh
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 /rsync_tmbackup.sh
parentb9d359f797d67749a180b7fdae7d7a828725cc58 (diff)
Fixed issue with paths that contain spaces
Diffstat (limited to 'rsync_tmbackup.sh')
-rwxr-xr-xrsync_tmbackup.sh12
1 files changed, 6 insertions, 6 deletions
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'"
}
# -----------------------------------------------------------------------------