Yet more downloading, scripting and ignoring

This commit is contained in:
Dan Buch
2012-05-05 16:35:16 -04:00
parent ff322f9d0e
commit 74abbcb0fc
5 changed files with 87 additions and 48 deletions

24
algs4/download-others Executable file
View File

@@ -0,0 +1,24 @@
#!/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