# This sets a commit message and commits. Commit will only be done if there are changed files.
fortune="/usr/games/fortune"
-message=$(echo "Automatic commit. $(date)"; echo ""; $fortune; echo "")
+message=$0
+if [ "$message" == "" ]; then
+ message=$(echo "Automatic commit. $(date)"; echo ""; $fortune; echo "")
+fi
$git commit -m "$message"
if [ "$?" == 0 ]; then
echo "Commit at $(date)" >> commits.log