Created
February 23, 2012 14:37
-
-
Save dietmarw/1893117 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
OMLIBRARY="/tmp/MSLrelease/Modelica_aster/Modelica aster/Resources/help/" | |
cd "$OMLIBRARY" | |
rm -f *.png *.pdf FindFiles.log | |
grep -v http:// *.html | grep -v [Mm][Oo][Dd][Ee][Ll][Ii][Cc][Aa]:// | egrep -o "[A-Za-z_0-9%.: -]*/[A-Za-z_0-9%.:/ -]*\.(png|jpg|pdf)" | cut -d: -f2- | sort -u | tr -d \" > tmp | |
for f in `cat tmp`; do | |
f=`echo $f | sed 's/%20/ /'` | |
if test -f "$OMLIBRARY/$f"; then | |
## This one will be needed/adjusted for standalone documentation | |
`echo $f` | |
# d=`dirname "$f"` | |
# mkdir -p "$d" | |
# cp "$OMLIBRARY/$f" "$f" | |
else | |
echo Not found: $f | tee -a FindFiles.log | |
fi | |
done | |
#rm -f tmp |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment