#!/bin/sh # # Written by Florian Diesch # # Updates may be available at # # # This script is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # You are free to do with it what ever you want. # # Folder that contains the message file MSGDIR="/usr/local/share/gmodt" # Titel des Anzeige-Fensters TITLE="News" # File to keep track of the last run's timestamp STAMPFILE=~/.gmotd # Display all files if $STAMPFILE doesn't exist if [ -f "$STAMPFILE" ]; then FINDOPT="-newer $STAMPFILE" else FINDOPT='' fi # Display the messages find "$MSGDIR" -type f $FINDOPT -exec zenity --text-info --title="$TITLE" --filename='{}' \; # Update timestamp touch "$STAMPFILE"