]> rtime.felk.cvut.cz Git - coffee/buildroot.git/commitdiff
support/test-pkg: check the config snippet exists
authorYann E. MORIN <yann.morin.1998@free.fr>
Sun, 12 Feb 2017 14:53:06 +0000 (15:53 +0100)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sun, 12 Feb 2017 14:59:49 +0000 (15:59 +0100)
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
support/scripts/test-pkg

index 9066fa066736a0967316f3089862f3852b622b44..11ec18ca526397307ef9a7f921070048d44de7aa 100755 (executable)
@@ -39,6 +39,9 @@ main() {
     if [ -z "${cfg}" ]; then
         printf "error: no config snippet specified\n" >&2; exit 1
     fi
+    if [ ! -e "${cfg}" ]; then
+        printf "error: %s: no such file\n" "${cfg}" >&2; exit 1
+    fi
     if [ -z "${dir}" ]; then
         dir="${HOME}/br-test-pkg"
     fi