#! /bin/bash

echo $@

if [ ! -z $5 ]; then
  exit 
fi

if [ -z $1 ]; then
  mkdir /tmp/sl
  cd /tmp/sl
fi

for x in 1 2 3 4; do
  mkdir $x.dir ;
  ln -s $x.dir $x ;
done

for x in 1 2 3 4; do
  pushd $x.dir >/dev/null
  sh -c "/tmp/create_tree.sh $@ $x"
  popd >/dev/null
done
