mirror of
https://github.com/notwa/rc
synced 2024-05-16 17:23:24 -07:00
fix backup function
This commit is contained in:
parent
a458f760b9
commit
6a57d0afdd
|
@ -24,7 +24,7 @@ cleanup() {
|
|||
}
|
||||
|
||||
backup() {
|
||||
if [ -e "$1" ]; then
|
||||
if [ -e "${1}~" ]; then
|
||||
backup "${1}~" || die 'failed to backup file' "$1"
|
||||
fi
|
||||
mv "$1" "${1}~" || die 'failed to backup file' "$1"
|
||||
|
|
Loading…
Reference in New Issue
Block a user