From 145daf87e6123f368accea7407877c6f89237bce Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 17 Feb 2011 17:44:54 +0100 Subject: [PATCH] exit on unset variables Signed-off-by: Nico Schottelius --- bin/cdist-explorer-run | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/bin/cdist-explorer-run b/bin/cdist-explorer-run index bf738355..fcbe2518 100755 --- a/bin/cdist-explorer-run +++ b/bin/cdist-explorer-run @@ -23,16 +23,12 @@ # . cdist-config - -if [ $# -ne 2 ]; then - __cdist_usage " " -fi +[ $# -eq 2 ] || __cdist_usage " " +set -ue export __cdist_target_host="$1"; shift export __cdist_output_dir="$1"; shift -set -e - # create basedir ssh root@${__cdist_target_host} "mkdir -p \"${__cdist_remote_base_dir}\" \ \"${__cdist_remote_cache_dir}\" \"${__cdist_remote_cache_bin}\" \