#!/bin/sh # Copyright © 2001 Jamie Zawinski # # Permission to use, copy, modify, distribute, and sell this software and its # documentation for any purpose is hereby granted without fee, provided that # the above copyright notice appear in all copies and that both that # copyright notice and this permission notice appear in supporting # documentation. No representations are made about the suitability of this # software for any purpose. It is provided "as is" without express or # implied warranty. # # Created: 14-Nov-2001. # # One of the screensavers on the kiosks runs a slideshow of images from the # web site. This is the script that mirrors that part of the web site locally # so that the images are easily accessible. # # It pulls the website mirror into /usr/local/etc/images/www/, then creates # a link farm to all of the non-thumbnail images in .../all-images/. set -e cd /usr/local/etc/images/www/ wget -e 'robots=off' -nv -m -nH -np \ http://www.dnalounge.com/flyers/ \ http://www.dnalounge.com/gallery/ \ http://www.dnalounge.com/backstage/log/ files=`find gallery flyers backstage/log \ \( -name '*jpg' -o -name '*gif' \) \! -name '*thumb*' -print | sort` rm -rf all-images mkdir all-images cd all-images for file in $files do file2=`echo $file | sed -e 's@[^/]*/@@' -e 's@[^-a-zA-Z0-9._]@-@g'` ln -s ../$file $file2 done exit 0