1
0
Fork 0
mirror of https://github.com/notwa/rc synced 2024-05-16 17:23:24 -07: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() {
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"