func: backupFiles

This commit is contained in:
Asif Bacchus 2019-05-20 16:53:50 -06:00
parent 1728409a9c
commit ebce5b9ed2

View File

@ -21,6 +21,15 @@ note="\e[95m"
### functions
function backupFiles {
# check if file exists
if [ -f "${F2B-DIR}/$1" ]; then
cp "${F2B-DIR}/$1" "${F2B-DIR}/$1.original"
return "$?"
fi
return 0
}
### end of functions