X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?p=xscreensaver;a=blobdiff_plain;f=OSX%2FMakefile;h=492bc69ced2dcaeba56fef2f885f18ce8bd6a773;hp=4fd574ca19282a9f7378e31c9fc104d951872116;hb=4361b69d3178d7fc98d0388f9a223af6c2651aba;hpb=d6b0217f2417bd19187f0ebc389d6c5c2233b11c diff --git a/OSX/Makefile b/OSX/Makefile index 4fd574ca..492bc69c 100644 --- a/OSX/Makefile +++ b/OSX/Makefile @@ -52,7 +52,8 @@ Sparkle.framework: # update-info-plist.pl runs this as needed. # Might be better to do this with curl, since that is installed by default. -URL = https://www.jwz.org/xscreensaver/screenshots/ +BASE = xscreensaver/screenshots/ +URL = https://www.jwz.org/$(BASE) WGET = wget -q -U xscreensaver-build-osx CVT = -thumbnail '200x150^' -gravity center -extent 200x150 \ \( +clone -alpha extract \ @@ -75,16 +76,20 @@ $(THUMBDIR)/%.png: if [ ! -d $(THUMBDIR) ]; then mkdir -p $(THUMBDIR) ; fi ; \ rm -f "$$FILE2" "$$TMP" ; \ set +e ; \ - echo "downloading $$URL..." ; \ - $(WGET) -O"$$TMP" "$$URL" ; \ - if [ ! -s "$$TMP" ]; then \ - echo "downloading $$URL2..." ; \ - $(WGET) -O"$$TMP" "$$URL2" ; \ - fi ; \ - if [ ! -s "$$TMP" ]; then \ - rm -f "$$TMP" ; \ - echo "failed: $$URL" ; \ - exit 1 ; \ + if [ -f "$$HOME/www/$(BASE)/$$FILE1" ]; then \ + cp -p "$$HOME/www/$(BASE)/$$FILE1" "$$TMP" ; \ + else \ + echo "downloading $$URL..." ; \ + $(WGET) -O"$$TMP" "$$URL" ; \ + if [ ! -s "$$TMP" ]; then \ + echo "downloading $$URL2..." ; \ + $(WGET) -O"$$TMP" "$$URL2" ; \ + fi ; \ + if [ ! -s "$$TMP" ]; then \ + rm -f "$$TMP" ; \ + echo "failed: $$URL" ; \ + exit 1 ; \ + fi ; \ fi ; \ rm -f "$$FILE2" ; \ convert jpg:- $(CVT) "$$FILE2" < "$$TMP" ; \