#!/bin/bash set -e set -x OTHERS=" 11model/RightTriangle.java 11model/Tone.java 11model/Scale.java 11model/Binomial.java 11model/Wget.java " cd src/java for other in $OTHERS do bn=$(basename "$other") if [ ! -f "$bn" ] then curl -O "http://algs4.cs.princeton.edu/${other}" chmod 444 "$bn" fi done