# Contact <francois@fleuret.org> for comments & bug reports #
#########################################################################
+# This command makes a backup copy of a given directory into a backup
+# directory, tags it with the date and time, and uses rsync
+# intelligent features to avoid making superfluous copies of files
+# which are already backuped.
+
set -e
[[ ${FREEZE_DIR} ]] || FREEZE_DIR=${HOME}/.backups
fi
while [[ "$1" ]]; do
-
- dir=$(basename "$1")
- path=$(dirname "$1")
+ real_path=$(realpath "$1")
+ dir=$(basename "${real_path}")
+ path=$(dirname "${real_path}")
full_path="${path}/${dir}"
date=$(date +%Y_%b_%d_%H:%M:%S)