box-o-sand/algs4/download-others
2012-05-05 16:40:22 -04:00

29 lines
407 B
Bash
Executable File

#!/bin/bash
set -e
set -x
OTHERS="
11model/RightTriangle.java
11model/Tone.java
11model/Scale.java
11model/Binomial.java
11model/Wget.java
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