Skip to content
Snippets Groups Projects
Commit ae50387d authored by James K. Lowden's avatar James K. Lowden :anchor:
Browse files

use local newcob.val if NIST returns HTML page instead of the file

parent cbf31323
No related branches found
No related tags found
No related merge requests found
Pipeline #1663 passed
......@@ -459,16 +459,24 @@ $(ORIG): $(ARCHIVE)
# Keep a copy of the .Z because uncompress(1) removes it. Set the
# date of the .Z to match that of newcob.val, so it's not downloaded
# again.
#
# If the file cannot be uncompressed, use a local version, if extant.
newcob.val: newcob.val.Z
cp $^ .$^
uncompress $^
uncompress $^ || { \
file $^; \
echo using local copy of $^; \
cp -v $(HOME)/$^ $^; \
cp $^ .$^; \
uncompress $^; \
}
cp .$^ $^
touch -r $@ $^
URL = http://www.itl.nist.gov/div897/ctg/suites/newcob.val.Z
newcob.val.Z:
# The file from NIST doesn't exist, so we need to download it.
wget -O $@~ $(URL) || cp $(HOME)/$@ $@~
wget -O $@~ $(URL) || cp -v $(HOME)/$@ $@~
@mv $@~ $@
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment