You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
324 B
22 lines
324 B
13 years ago
|
#!/bin/bash
|
||
|
|
||
|
set -e
|
||
|
set -x
|
||
|
|
||
12 years ago
|
OTHERS="$(cat others.txt)"
|
||
13 years ago
|
|
||
|
cd src/java
|
||
|
|
||
|
for other in $OTHERS
|
||
|
do
|
||
12 years ago
|
if [ ! -f "$other" ]
|
||
13 years ago
|
then
|
||
12 years ago
|
dn=$(dirname "$other")
|
||
|
mkdir -p "$dn"
|
||
|
pushd "$dn"
|
||
13 years ago
|
curl -O "http://algs4.cs.princeton.edu/${other}"
|
||
12 years ago
|
chmod 444 "$(basename "$other")"
|
||
|
popd
|
||
13 years ago
|
fi
|
||
|
done
|