exit on unset variables
Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
parent
8d8d7da036
commit
145daf87e6
1 changed files with 2 additions and 6 deletions
|
@ -23,16 +23,12 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
. cdist-config
|
. cdist-config
|
||||||
|
[ $# -eq 2 ] || __cdist_usage "<target host> <outdir>"
|
||||||
if [ $# -ne 2 ]; then
|
set -ue
|
||||||
__cdist_usage "<target host> <outdir>"
|
|
||||||
fi
|
|
||||||
|
|
||||||
export __cdist_target_host="$1"; shift
|
export __cdist_target_host="$1"; shift
|
||||||
export __cdist_output_dir="$1"; shift
|
export __cdist_output_dir="$1"; shift
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
# create basedir
|
# create basedir
|
||||||
ssh root@${__cdist_target_host} "mkdir -p \"${__cdist_remote_base_dir}\" \
|
ssh root@${__cdist_target_host} "mkdir -p \"${__cdist_remote_base_dir}\" \
|
||||||
\"${__cdist_remote_cache_dir}\" \"${__cdist_remote_cache_bin}\" \
|
\"${__cdist_remote_cache_dir}\" \"${__cdist_remote_cache_bin}\" \
|
||||||
|
|
Loading…
Reference in a new issue