bak: fixed directory handling

This commit is contained in:
Roman Inflianskas 2014-08-06 18:18:04 +04:00
parent 672ec0894d
commit 1335503cd6
2 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,6 @@
function __bak_name
# trim / for directories
set arg (echo $argv[1] | sed "s/\///")
set arg (echo $argv[1] | sed 's/\/$//')
echo "$arg.(date +"%Y%m%d_%H%M%S").bak"
end

View File

@ -2,5 +2,5 @@
# (c) Roman Inflianskas (rominf) <infroma@gmail.com>, 2014
function cpbak
__bak cp $argv
__bak 'cp -a' $argv
end