Yet more downloading, scripting and ignoring
This commit is contained in:
24
algs4/download-others
Executable file
24
algs4/download-others
Executable 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
|
Reference in New Issue
Block a user