panthema / 2012 / 1119-eSAIS-Inducing-Suffix-and-LCP-Arrays-in-External-Memory / eSAIS-DC3-LCP-0.5.0 / stxxl / misc / remove-unless (Download File)
#!/bin/sh

test $# = 3 || exit 1

file="$1"
bn=`dirname "$file"`/`basename "$1" "$2"`
predep="$bn$3"

if [ ! -e "$predep" ]; then
	echo "rm -f $file"
	rm -f "$file"
fi