Fixed "make clean"

This commit is contained in:
Pierre Pronchery 2013-01-07 03:33:13 +01:00
parent 397034bdc5
commit a660da295d

View File

@ -1,6 +1,6 @@
#!/usr/bin/env sh #!/usr/bin/env sh
#$Id$ #$Id$
#Copyright (c) 2012 Pierre Pronchery <khorben@defora.org> #Copyright (c) 2012-2013 Pierre Pronchery <khorben@defora.org>
#This file is part of DeforaOS Desktop Mailer #This file is part of DeforaOS Desktop Mailer
#This program is free software: you can redistribute it and/or modify #This program is free software: you can redistribute it and/or modify
#it under the terms of the GNU General Public License as published by #it under the terms of the GNU General Public License as published by
@ -25,8 +25,12 @@ _usage()
#main #main
while getopts "P:" "name"; do clean=0
while getopts "cP:" name; do
case "$name" in case "$name" in
c)
clean=1
;;
P) P)
#XXX ignored #XXX ignored
;; ;;
@ -43,6 +47,8 @@ if [ $# -ne 1 ]; then
fi fi
target="$1" target="$1"
[ "$clean" -ne 0 ] && exit 0
> "$target" > "$target"
FAILED= FAILED=
./date >> "$target" || FAILED="$FAILED date(error $?)" ./date >> "$target" || FAILED="$FAILED date(error $?)"