5 # The following code is a modified version of an original work written by
6 # Ken Moffat for their "farce" project and is included here with his
13 desc: creates farce file lists
14 usage: filelist $DEST_FARCE/$ITERATION $DEST_FARCE/$ITERATION.filelist
15 input vars: $1 directory where files from current iteration are stored
16 $2 name of the file list to be created
27 echo -e "\nOutput $2 already exists\n"
31 echo -e "\nMissing argument\n"
35 if [ "$1" == "/" ]; then
38 # ensure the path or mountpoint ends with a slash
39 # because of the seds after the 'find'
40 LOC
=`echo $1 | sed 's%[^/]$%&/%'`
43 echo -en "\nCreating file list for farce amalysis in $OUTFILE ..."
44 if [ -f $OUTFILE ]; then
45 echo "refusing to overwrite $OUTFILE"
49 # check we can indeed do this
52 echo "error, cannot write to $OUTFILE"
56 find $LOC -xdev -xtype f |
sed "s%^${LOC}%/%" |
sort >$OUTFILE