1
0
Fork 0
mirror of https://github.com/notwa/rc synced 2025-02-05 07:43:22 -08:00

fix backup function

This commit is contained in:
Connor Olding 2021-08-01 01:02:28 -07:00
parent a458f760b9
commit 6a57d0afdd

View file

@ -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"