-a is not well defined.

Signed-off-by: Rosen Penev <ros...@gmail.com>
---
 scripts/clean-package.sh | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/scripts/clean-package.sh b/scripts/clean-package.sh
index b64d7ad21a..2c9d4169ba 100755
--- a/scripts/clean-package.sh
+++ b/scripts/clean-package.sh
@@ -1,13 +1,14 @@
 #!/usr/bin/env bash
 IFS=$'\n'
-[ -n "$1" -a -n "$2" ] || {
+
+if [ -z "$1" ] || [ -z "$2" ]; then
        echo "Usage: $0 <file> <directory>"
        exit 1
-}
-[ -f "$1" -a -d "$2" ] || {
+fi
+if [ ! -f "$1" ] || [ ! -d "$2" ]; then
        echo "File/directory not found"
        exit 1
-}
+fi
 (
        cd "$2" || exit 1
        while read -r entry; do
-- 
2.24.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to