From 541c83f928adc1d9ad195e81f3b9ef20a95c89976b2022da1ec288f30aa88578 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Mon, 14 Mar 2011 10:40:08 +0000 Subject: [PATCH] Fail on invalid input file OBS-URL: https://build.opensuse.org/package/show/openSUSE:Tools/obs-service-recompress?expand=0&rev=5 --- recompress | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/recompress b/recompress index 60f9036..56b350e 100644 --- a/recompress +++ b/recompress @@ -50,7 +50,11 @@ if [ -z "$MYOUTDIR" ]; then fi for i in $FILES; do - FILE=`ls -1 "$i" || ls -1 "_service:download:$i"` + FILE=`ls -1 "$i" || ls -1 "_service:*:$i"` + if [ ! -f "$FILE" ]; then + echo "Unknown file $i" + exit 1 + fi UNCOMPRESS="cat" BASENAME="$FILE" if [ "${FILE%.gz}" != "$FILE" ]; then