added all non-code changes between r281 and r300 to the new release candidate

This commit is contained in:
lars 2005-10-17 14:36:12 +00:00
parent 3cad3c5ae8
commit 7260c63d86
107 changed files with 5526 additions and 4016 deletions

View file

@ -1,4 +1,5 @@
#!/bin/sh
# $Id$
#
# managing our work at the cryptobox
#
@ -88,19 +89,9 @@ function configure_cb()
echo "Copying files to the box ..."
[ -e "$TMP_DIR" ] && rm -rf "$TMP_DIR"
cp -dr "$TEMPLATE_DIR/." "$TMP_DIR"
rm -rf `find "$TMP_DIR" -type d -name ".svn"`
cp -dr "$TMP_DIR/." "$IMAGE_DIR"
rm -rf "$TMP_DIR"
svn export --force "$TEMPLATE_DIR/." "$IMAGE_DIR"
echo "Configuring the cryptobox ..."
# "harden" removes /etc/issue ...
if [ -e "$IMAGE_DIR/etc/issue" ]
then sed -i "s/^Version:/Revision:/" "$IMAGE_DIR/etc/issue"
sed -i "s/^Revision:.*/Revision: $(fetch_revision)/" "$IMAGE_DIR/etc/issue"
else echo "Revision: $(fetch_revision)" >"$IMAGE_DIR/etc/issue"
fi
fetch_revision >"$IMAGE_DIR/etc/cryptobox/revision"
chroot "$IMAGE_DIR" "$CHROOT_START" /usr/lib/cryptobox/configure-cryptobox.sh normal
# source local configure scripts
@ -115,13 +106,6 @@ function configure_cb()
}
function fetch_revision()
{
svn -R info 2>&1 | grep ^Revision| cut -f2 -d " " | sort | tail -1 \
|| echo "unknown release"
}
function blanknburn_cdrw()
{
cdrecord -v dev=$CDWRITER blank=fast

View file

@ -1,4 +1,5 @@
#!/bin/sh
# $Id$
#
# managing our work at the cryptobox
#

View file

@ -7,19 +7,24 @@
set -ue
# root directory of the cryptobox development environment
ROOT_DIR="$(dirname $(dirname $0))"
ROOT_DIR="$(dirname $0)/.."
# retrieve these pages from the wiki
PAGES="CryptoBox CryptoBoxIntro CryptoBoxDev CryptoBoxDevPreparation CryptoBoxDevCustomBuild CryptoBoxDevWorkFlow CryptoBoxDevValidation CryptoBoxDevCustomConfigure CryptoBoxDevBackground CryptoBoxDevKnownProblems CryptoBoxUser CryptoBoxUserGettingStarted CryptoBoxUserConfiguration CryptoBoxUserDailyUse"
PAGES="CryptoBox CryptoBoxUser CryptoBoxUserGettingStarted
CryptoBoxUserConfiguration CryptoBoxUserDailyUse CryptoBoxDev
CryptoBoxDevPreparation CryptoBoxDevCustomBuild CryptoBoxDevWorkFlow
CryptoBoxDevValidation CryptoBoxDevCustomConfigure CryptoBoxDevBackground
CryptoBoxDevKnownProblems"
#PAGES="CryptoBox"
# base URL
WIKI_HOST="https://systemausfall.org"
# the trailing slash is important
WIKI_URL=/toolforge/
WIKI_URL=/trac/cryptobox/wiki/
CBOX_CGI="/cryptobox?action=doc\&page="
LANGUAGES="en de"
LANGUAGES="de en"
DEST_DIR="$ROOT_DIR/cbox-tree.d/usr/share/doc/cryptobox/html"
OFFLINE_DIR="$ROOT_DIR/cbox-tree.d/_offline/doc"
@ -44,36 +49,42 @@ for LANG in $LANGUAGES; do
wget --quiet --output-document="$TMP_FILE" "$PAGE_SRC" || { echo "Downloading ($PAGE_SRC) failed!"; exit 1; }
# check if this moin page exists (by looking for the template selection)
if grep -q "$WIKI_URL$PAGE/$LANG.action=edit&template=" "$TMP_FILE"
if grep -q "^describe $PAGE/$LANG here$" "$TMP_FILE"
then rm "$TMP_FILE"
PAGE_SRC=$(dirname $PAGE_SRC)
echo " trying to download default language page instead"
wget --quiet --output-document="$TMP_FILE" "$PAGE_SRC" || { echo "Downloading ($PAGE_SRC) failed!" >&2; exit 1; }
# check, if there is even no default page
grep -q "$WIKI_URL$PAGE/$LANG.action=edit&template=" "$TMP_FILE" && echo "This page ($PAGE_SRC) was not found!" >&2 && exit 1
grep -q "^describe $PAGE/$LANG here$" "$TMP_FILE" && echo "This page ($PAGE_SRC) was not found!" >&2 && exit 1
fi
echo " removing header and footer ..."
# break lines before start of content
sed -i 's#<div [^>]* id="content" [^>]*>#_END_OF_HEADER_\n#' "$TMP_FILE"
sed -i 's#<a id="bottom">#\n_START_OF_FOOTER_#' "$TMP_FILE"
sed -i 's#<div id="content" class="wiki">#_END_OF_HEADER_\n#' "$TMP_FILE"
# the 'edit' buttons mark the end of the page
sed -i 's#<div class="buttons">#\n_START_OF_FOOTER_#' "$TMP_FILE"
# cut off a possible comment - section
sed -i "s#<form action=[^>]*\#commentpreview#\n_START_OF_FOOTER_#" "$TMP_FILE"
# remove all lines before and after "body"
sed -i '1,/_END_OF_HEADER_/d; /_START_OF_FOOTER_/,$d' "$TMP_FILE"
echo " removing link images (moin specific) ..."
# close open divs
while [ "$(grep '<div' "$TMP_FILE" | wc -l)" -gt "$(grep '</div>' "$TMP_FILE" | wc -l)" ]
do echo "</div>" >>"$TMP_FILE"
done
#echo " removing link images (moin specific) ..."
# remove inter-wiki images
sed -i 's#<[^<]*moin-inter.png[^>]*>##g' "$TMP_FILE"
#sed -i 's#<[^<]*moin-inter.png[^>]*>##g' "$TMP_FILE"
# remove moin-www images
sed -i 's#<[^<]*moin-www.png[^>]*> ##g' "$TMP_FILE"
#sed -i 's#<[^<]*moin-www.png[^>]*> ##g' "$TMP_FILE"
echo " downloading requisites ..."
wget --quiet --ignore-tags=a --no-clobber --page-requisites --convert-links --no-parent --no-directories --base="$WIKI_HOST$WIKI_URL" --directory-prefix="$TMP_DIR" --html-extension --force-html --input-file="$TMP_FILE" || { echo "Downloading requisites for ($PAGE_SRC) failed!"; exit 1; }
# not necessary, because everything is a part of the repository
#echo " downloading requisites ..."
#wget --quiet --ignore-tags=a --no-clobber --page-requisites --convert-links --no-directories --base="$WIKI_HOST$WIKI_URL" --directory-prefix="$TMP_DIR" --html-extension --force-html --input-file="$TMP_FILE" || { echo "Downloading requisites for ($PAGE_SRC) failed!"; exit 1; }
echo " adjusting links for requisites ..."
find "$TMP_DIR" -type f | grep -v '\.html$' | while read a
do fname=$(basename "$a")
sed -i "s#=\"[^\"]*/$fname\"#=\"/cryptobox-img/$fname\"#g" "$TMP_FILE"
done
echo " adjusting links for images ..."
sed -i "s#='[^']*/cryptobox-img/\([^']*\)'#='/cryptobox-img/\1'#g" "$TMP_FILE"
echo " adjusting wiki links ..."
# redirect wiki links to cryptobox cgi
@ -82,7 +93,7 @@ for LANG in $LANGUAGES; do
sed -i "s#=\"$WIKI_URL\([^\.]*\)\"#=\"$CBOX_CGI\1\"#g" "$TMP_FILE"
# remove language specific part of moin link
for TLANG in $LANGUAGES
do sed -i "s#=\"$CBOX_CGI\(.*\)/$TLANG\"#=\"$CBOX_CGI\1\"#g" "$TMP_FILE"
do sed -i "s#=\"$CBOX_CGI\([^\"]*\)/$TLANG#=\"$CBOX_CGI\1#g" "$TMP_FILE"
done
@ -91,10 +102,10 @@ for LANG in $LANGUAGES; do
offline_file=$OFFLINE_DIR/$LANG/$(basename $TMP_FILE)
mkdir -p "$OFFLINE_DIR/$LANG"
cat "$OFFLINE_DIR/$HEADER_FILE" "$OFFLINE_DIR/$LANG/$HEADER_FILE" "$TMP_FILE" "$OFFLINE_DIR/$LANG/$FOOTER_FILE" "$OFFLINE_DIR/$FOOTER_FILE" >"$offline_file"
sed -i "s#=\"$CBOX_CGI\([^\"]*\)\"#=\"\1.html\"#g" "$offline_file"
sed -i "s%=\"$CBOX_CGI\([^\"#]*\)%=\"\1.html%g" "$offline_file"
# do it twice - this should not be necessary
sed -i "s#=\"$CBOX_CGI\([^\"]*\)\"#=\"\1.html\"#g" "$offline_file"
sed -i "s#=\"/cryptobox-img#=\"../../../var/www/cryptobox-img#g" "$offline_file"
sed -i "s%=\"$CBOX_CGI\([^#\"]*\)%=\"\1.html%g" "$offline_file"
sed -i "s#='/cryptobox-img#='../../../var/www/cryptobox-img#g" "$offline_file"
# split language specific part of moin link and replace it by current language
for TLANG in $LANGUAGES
@ -111,5 +122,5 @@ for LANG in $LANGUAGES; do
done
done
mv "$TMP_DIR"/* "$IMAGE_DIR"
[ -n "$(find "$TMP_DIR" -type f)" ] && mv "$TMP_DIR"/* "$IMAGE_DIR"
rmdir "$TMP_DIR"