From a660da295d6cd032dd33c98c4030fab0f3a3ba96 Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Mon, 7 Jan 2013 03:33:13 +0100 Subject: [PATCH] Fixed "make clean" --- tests/tests.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/tests.sh b/tests/tests.sh index 96b2672..f7df13f 100755 --- a/tests/tests.sh +++ b/tests/tests.sh @@ -1,6 +1,6 @@ #!/usr/bin/env sh #$Id$ -#Copyright (c) 2012 Pierre Pronchery +#Copyright (c) 2012-2013 Pierre Pronchery #This file is part of DeforaOS Desktop Mailer #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 @@ -25,8 +25,12 @@ _usage() #main -while getopts "P:" "name"; do +clean=0 +while getopts "cP:" name; do case "$name" in + c) + clean=1 + ;; P) #XXX ignored ;; @@ -43,6 +47,8 @@ if [ $# -ne 1 ]; then fi target="$1" +[ "$clean" -ne 0 ] && exit 0 + > "$target" FAILED= ./date >> "$target" || FAILED="$FAILED date(error $?)"