Browse Source

Add error if DEB_DIR does not exist or is not read readable

Julien Vaubourg 9 years ago
parent
commit
9ddbcbba52
1 changed files with 5 additions and 0 deletions
  1. 5 0
      olinux/create_device.sh

+ 5 - 0
olinux/create_device.sh

@@ -55,6 +55,11 @@ while getopts ":s:d:t:b:u:e" opt; do
   esac
 done
 
+if [ ! -r "${DEB_DIR}" ]; then
+  echo "[ERR] Cannot read ${DEB_DIR}" >&2
+  exit 1
+fi
+
 if [ -z $DEVICE ] ; then
   show_usage
 fi