mirror of
https://github.com/notwa/rc
synced 2025-02-05 07:43:22 -08:00
fix backup function
This commit is contained in:
parent
a458f760b9
commit
6a57d0afdd
1 changed files with 1 additions and 1 deletions
|
@ -24,7 +24,7 @@ cleanup() {
|
||||||
}
|
}
|
||||||
|
|
||||||
backup() {
|
backup() {
|
||||||
if [ -e "$1" ]; then
|
if [ -e "${1}~" ]; then
|
||||||
backup "${1}~" || die 'failed to backup file' "$1"
|
backup "${1}~" || die 'failed to backup file' "$1"
|
||||||
fi
|
fi
|
||||||
mv "$1" "${1}~" || die 'failed to backup file' "$1"
|
mv "$1" "${1}~" || die 'failed to backup file' "$1"
|
||||||
|
|
Loading…
Add table
Reference in a new issue