Sophie

Sophie

distrib > Mandriva > 2010.1 > x86_64 > by-pkgid > cffa7e52474afabc794a42260ccf9f48 > files > 29

apache-mod_mbox-0.2-1.r670198.5mdv2010.1.x86_64.rpm

#!/bin/zsh
# You need to run this file and place it as mbox-archives.list and all will
# be well.

if [ -z $1 ] ; then
  prefix=`pwd`
else
  prefix=$1
fi

lists=()
entries=()

echo "# This file is automatically generated by create-archive-list! " 
for i in $prefix/* ; do
  if [ ! -d $i ] ; then
    continue;
  fi
  loc=`echo $i | sed "s#$prefix/##g"`
  second=`echo $loc | cut -f 3 -d / -`
  dirname="$second"
  entry_name=`echo $dirname | sed "s#-#_#g"`
  entry="$entry_name=($dirname private $i $i)"
  lists=($lists $entry_name)
  entries=($entries $entry)
done

echo "ARCHIVES=("
for i in ${lists}; do
  echo ${i}
done
echo ")"
echo 'set -A ${ARCHIVES}'
echo 'export ARCHIVES'

for i in ${entries}; do
  echo ${i}
done
#for i in ${lists}; do
#  echo "export ${i}"
#done