diff --git a/scripts/check-kernel-commit b/scripts/check-kernel-commit index e9c87b4..57b5642 100755 --- a/scripts/check-kernel-commit +++ b/scripts/check-kernel-commit @@ -18,11 +18,12 @@ fetch_branches() local URL="https://kerncvs.suse.de/branches.conf" local EXPIRE=7 branches=$CACHED_BRANCHES - if [[ $(find "$CACHED_BRANCHES" -mtime -$EXPIRE -print 2>/dev/null) ]]; then + if [[ $(find "$CACHED_BRANCHES" -mtime -$EXPIRE -print 2>/dev/null) \ + && -s "$CACHED_BRANCHES" ]]; then echo "Using cached $CACHED_BRANCHES" >&2 return fi - curl "$URL" >$CACHED_BRANCHES + curl "$URL" -o "$CACHED_BRANCHES" } if [ $# -lt 1 ] ; then