#!/bin/bash

# the directories are always needed
find . -type d >~/listing
gawk '{print "mkdir \""$0"\""}' <~/listing >~/createdirstruct
find . >~/listing.tmp

# now remove all the files we already knew
grep -vxFf ~/listing.done ~/listing.tmp >~/listing
cat <~/listing >>~/listing.done
rm ~/listing.tmp

# create entries for the new onew
gawk '{print "echo \""$0"\" >\""$0"\""}' <~/listing >>~/createdirstruct
chmod 755 ~/createdirstruct
