BIO_DIR := ~/Documents/Administrivia/Bios all: node build.js fetch: @if [ -f $(BIO_DIR)/Rakefile ] ; then \ echo "Fetching Updates"; \ /bin/bash -c "cd $(BIO_DIR); pwd; git pull;"\ echo "Building JSON"; \ rake -f $(BIO_DIR)/Rakefile -E "Dir.chdir(File.expand_path '$(BIO_DIR)')" okennedy.json;\ cp $(BIO_DIR)/okennedy.json src/metadata/;\ else\ echo "Fetching JSON";\ cd src/metadata;\ curl -O http://www.cse.buffalo.edu/~okennedy/okennedy.json;\ fi push: fetch all find . -name .DS_Store | xargs rm rsync -avz -e ssh --safe-links --progress site/ gram:/var/www/static/ .PHONY: all fetch push