#!/bin/sh

#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=#
#          CHANGE ME             #
#                                #

rootdir="/home/B11E/balsoy/web/htdocs/Grading/icons"
webdir="/Grading/icons"
awkfile="/home/B11E/balsoy/web/cgi-bin/icons.awk"
diricon="internal-gopher-menu"
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=#

dir="$PATH_INFO"

# 10Kb'dan buyuk dosyalari gostermez.
maxsize=10000    # in bytes   # byte olarak

cd $rootdir

if [ "$dir" = " " ]
then
   status="dir"
   ls -al | /bin/awk -f $awkfile webdir=$webdir status=$status dir=$dir maxsize=$maxsize diricon=$diricon
else
   status="file"
   cd $rootdir$dir
   ls -l *.gif | /bin/awk -f $awkfile webdir=$webdir status=$status dir=$dir maxsize=$maxsize diricon=$diricon
fi

