diff options
author | Patrick Spek <p.spek@tyil.nl> | 2020-02-23 12:13:12 +0100 |
---|---|---|
committer | Patrick Spek <p.spek@tyil.nl> | 2021-08-14 11:59:30 +0200 |
commit | 71577d1fe5b31f51474e918159817dd926b238d3 (patch) | |
tree | 0c9d5a15ef08d38d6aa4cc27aa1e9cbada2efafe /.local | |
parent | 3dd93ef53990aca21af9ddac87e256c203b9bc8b (diff) |
Deal with trailing / a bit better
Diffstat (limited to '.local')
-rwxr-xr-x | .local/bin/mkbak | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/.local/bin/mkbak b/.local/bin/mkbak index 07a5d47..16206e3 100755 --- a/.local/bin/mkbak +++ b/.local/bin/mkbak @@ -1,4 +1,5 @@ #!/usr/bin/env sh -cp -r "${1}" "${1}.bak-$(date +%Y%m%d%H%M%S)" +path="${1%/}" +cp -r "$path" "$path.bak-$(date +%Y%m%d%H%M%S)" |