#!/usr/local/bin/perl ####################################################### # # daymove.pl 8/1/99 # # Toon Update Program by David deVitry # ####################################################### # # Place an entry in you cron list like this # # 0 1 * * * /path/to/this/program # # Then set the $base variable to the location of # your toon directory. Name the files in that # diretory by the date you want them to go up. # (ie. 080199.gif for August 1, 1999. ) # # Distributed under the GNU Public License. # Please see http://www.gnu.org # # Please visit www.thecomicportal.com for more info. $base = "/usr/home/webcom/www/tgif"; $finalName = "current"; # for current.gif $ext = "gif"; # for .gif ##################################################### use File::Copy; ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = localtime(time); $mon++; if (length($mon) < 2) {$mon = "0$mon";} if (length($mday) < 2) {$mday = "0$mday";} if (length($year) > 2) { $yeaer =~ s/^.//;} # year 100 fix $my_date = "$mon$mday$year"; if ( -e "$base/$my_date.$ext") { copy("$basen/$my_date.$ext", "$base/$finalName.$ext"); }