Cleaner tutorial asset stuff

This commit is contained in:
Dan Buch 2015-05-14 19:06:46 -04:00
parent 23e98227ce
commit 6ca2bd4d31
3 changed files with 7 additions and 7 deletions

3
.gitignore vendored
View File

@ -7,5 +7,4 @@
intro-to-crafty/lib/crafty.js
intro-to-crafty/assets/*
intro-to-crafty/crafty_bng_tut_assets*
__MACOSX
intro-to-crafty/tmp/*

View File

@ -1,5 +1,5 @@
INTRO_ASSETS_ZIP := crafty_bng_tut_assets.zip
INTRO_ASSETS_EXTRACTED_README := crafty_bng_tut_assets/README
INTRO_ASSETS_ZIP := tmp/crafty_bng_tut_assets.zip
INTRO_ASSETS_EXTRACTED_README := tmp/crafty_bng_tut_assets/README
.PHONY: all
all: lib/crafty.js assets/README
@ -12,11 +12,12 @@ lib/crafty.js:
curl -sSL -o $@ http://craftyjs.com/release/0.5.3/crafty.js
assets/README: $(INTRO_ASSETS_EXTRACTED_README)
rsync -av $(dir $(INTRO_ASSETS_EXTRACTED_README))/ assets/
rsync -av $(dir $(INTRO_ASSETS_EXTRACTED_README)) assets/
$(INTRO_ASSETS_EXTRACTED_README): $(INTRO_ASSETS_ZIP)
unzip $(INTRO_ASSETS_ZIP)
find $(dir $(INTRO_ASSETS_EXTRACTED_README)) -type f | xargs touch
cd tmp && \
unzip -o $(notdir $(INTRO_ASSETS_ZIP)) && \
find . -type f | xargs touch
$(INTRO_ASSETS_ZIP):
curl -sSL -o $@ http://buildnewgames.com/assets/article//introduction-to-crafty/crafty_bng_tut_assets.zip

View File