This commit is contained in:
Jephté Clain 2015-04-20 17:43:24 +04:00
parent 7e0d44bfdd
commit d3ab6b85e2
1 changed files with 3 additions and 1 deletions

View File

@ -64,7 +64,9 @@ function copy_replace() {
fi
local r=0
if cp "$src" "$dest"; then
[ -n "$3" ] && chmod "$3" "$dest" || r=$?
if [ -n "$3" ]; then
chmod "$3" "$dest" || r=$?
fi
fi
return $r
}