dirlist=`ls`
for i in $dirlist
do
  if [ -d "`echo $i`" ]
  then
    echo $i
    tar -czf $i.tgz $i
  fi
done
