validation script fixed (some sed expressions)

This commit is contained in:
lars 2005-09-16 03:33:00 +00:00
parent 2521d5f74a
commit 2780ec34b6
1 changed files with 3 additions and 2 deletions

View File

@ -29,6 +29,7 @@ function do_single()
cp "$1/description" "${2}/${TESTNAME}.desc"
# sleep, if a file called 'delay' exists
[ -e "$1/delay" ] && sleep "$(<$1/delay)"
true
}
@ -80,13 +81,13 @@ function import_style()
[ -e "$VALIDATE_REPORT_DIR/cryptobox.css" ] && rm "$VALIDATE_REPORT_DIR/cryptobox.css"
wget -q -O "$VALIDATE_REPORT_DIR/cryptobox.css" http://$VALIDATE_HOST_IP_DEFAULT/cryptobox.css
# extract image file names
grep "url(/cryptobox-img/" "$VALIDATE_REPORT_DIR/cryptobox.css" | sed 's#^.*url(/cryptobox-img/\(.*\)).*$#\1#' | while read a
grep "url(cryptobox-img/" "$VALIDATE_REPORT_DIR/cryptobox.css" | sed 's#^.*url(cryptobox-img/\(.*\)).*$#\1#' | while read a
do wget -q -O "$VALIDATE_REPORT_DIR/cryptobox-img/$a" "http://$VALIDATE_HOST_IP_DEFAULT/cryptobox-img/$a"
done
# change the stylesheet link in every html file in REPORT_DIR
find "$VALIDATE_REPORT_DIR" -type f -name \*.html | while read a
do sed -i '#link rel="stylesheet"#s#href="/cryptobox.css"#href="../cryptobox.css"#g' "$a"
do sed -i '/stylesheet/s#href=\"/cryptobox.css\"#href=\"../cryptobox.css\"#g' "$a"
done
}