diff options
Diffstat (limited to 'navit/tools/cleanattr.sh')
| -rwxr-xr-x | navit/tools/cleanattr.sh | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/navit/tools/cleanattr.sh b/navit/tools/cleanattr.sh index 200db5b66..c5e36792a 100755 --- a/navit/tools/cleanattr.sh +++ b/navit/tools/cleanattr.sh @@ -20,8 +20,8 @@ if [ -f $TMPFILE ] ; then exit 1; fi -touch $TMPFILE -if [ $? -ne 0 ] ; then +if ! touch $TMPFILE +then echo "Could not write to temporary file $TEMPFILE." echo "Please make sure you have write access to the temporary directory." exit 1; @@ -35,9 +35,8 @@ cp $ATTRFILE $TMPFILE for ATTRNAME in $ATTRLIST ; do ATTR="attr_$ATTRNAME" - grep -rI $ATTR ./* > /dev/null - - if [ $? -ne 0 ] ; then + if ! grep -rI $ATTR ./* > /dev/null + then echo "Unused attribute: $ATTR" grep -v "ATTR($ATTRNAME)" $TMPFILE > $TMPFILE2 mv $TMPFILE2 $TMPFILE |
