Bluefish
Jump to navigation
Jump to search
My favourite code editor.
In preferences - External Commands add the SaveVersion script to save a file with the current timestamp. The file is only copied if it differs from the last version saved.
#!/bin/bash
FILE=$1
if (( ! ls -1 "${FILE}"_* > /dev/null ) || ( ! diff "${FILE}" `ls -1 "${FILE}"_*|tail -1` > /dev/null ))
then
cp "${FILE}" "${FILE}_"`date +%Y%m%d_%H%M%S`
fi