#!/bin/bash
albumpath="/root/bin"
# Letzte Aenderung: 2006-03-18, Version 0.2.1, Johannes Creutziger
awk -f $albumpath/preparealbum.awk texte > .album.shiftednames
awk -f $albumpath/modify.awk texte > .modified.texte
echo "Falls eine Datei \"index.html\" im aktuellen Verzeichnis vorhanden ist,"
echo "so wird diese ueberschrieben."

if [ "$1" != "" ] ; then
  A1="-v"
  B1=$1
fi

if [ "$2" != "" ] ; then
  A2="-v"
  B2=$2
fi

if [ "$3" != "" ] ; then
  A3="-v"
  B3=$3
fi

if [ "$4" != "" ] ; then
  A4="-v"
  B4=$4
fi

awk -f $albumpath/album.awk $A1 $B1 $A2 $B2 $A3 $B3 $A4 $B4 .modified.texte > index.html
rm .album.shiftednames
rm .modified.texte
