From ee6784aa2fbb44cb656eba7c1758fea5d3532473 Mon Sep 17 00:00:00 2001 From: midipix Date: Mon, 12 Oct 2020 23:35:35 +0000 Subject: once/update.sh: properly handle the nothing-to-do case. --- once/update.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/once/update.sh b/once/update.sh index 748f65b..6385e2e 100755 --- a/once/update.sh +++ b/once/update.sh @@ -10,7 +10,13 @@ else mkdir -p "$SYSROOT" || exit 2 fi -for tarball in /updates/*.tar.gz; do +tarballs=$(ls /updates/*.tar.gz 2>/dev/null) + +if [ "$tarballs" = '/updates/*.tar.gz' ]; then + exit 0 +fi + +for tarball in $tarballs; do tarball="${tarball##*/}" echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ -- cgit v1.2.3