box-o-sand/algs4/download-others

29 lines
407 B
Plaintext
Raw Normal View History

#!/bin/bash
set -e
set -x
OTHERS="
11model/RightTriangle.java
11model/Tone.java
11model/Scale.java
11model/Binomial.java
11model/Wget.java
2012-05-05 20:40:22 +00:00
11model/largeT.txt
11model/largeW.txt
11model/tinyT.txt
11model/tinyW.txt
"
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