#!/bin/sh # Copyright (C) 2005 Krzysztof Kozlowski # License: GNU General Public License version 2 # http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # version 2 as published by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # # Homepage: http://www.kozik.net.pl # # Ostatnia zmiana: 14.11.2005 # # Listing katalogu do pliku HTML if [ $# -ne 2 ]; then echo "Usage: $0 katalog plik_wynikowy" exit 127 fi PLIKI=`ls $1` rm -f $2 touch $2 echo '' >> $2 echo '' >> $2 echo '' >> $2 echo 'Biblioteczka Bezpiecznego Człowieka (Kozik)' >> $2 echo '' >> $2 echo '' >> $2 echo '' >> $2 echo '' >> $2 echo '' >> $2 echo '
' >> $2 echo '
Biblioteczka Bezpiecznego Człowieka
' >> $2 echo '
Kozik
' >> $2 echo '' >> $2 COUNT=0 for i in $PLIKI; do if [ -d "${1}/${i}" ]; then continue fi if [ "$i" = "index.html" ]; then continue fi echo "
${i} " >> $2 COUNT=`expr $COUNT + 1` done echo '
' >> $2 echo "
W sumie tekstów: $COUNT
" >> $2 echo "" >> $2 echo '' >> $2