From f95e0d6aefd869d7c5e15032e72d5365499cd436 Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 17 Jul 2016 01:21:38 +0200 Subject: add flag to override ssh command --- bin/populate | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'bin') diff --git a/bin/populate b/bin/populate index bbe3b7a..fdc4c5d 100755 --- a/bin/populate +++ b/bin/populate @@ -10,6 +10,7 @@ debug=false force=false origin_host=${HOSTNAME-cat /proc/sys/kernel/hostname} origin_user=$LOGNAME +ssh_cmd=ssh target_spec= @@ -28,6 +29,9 @@ for arg; do --force) force=true ;; + --ssh=*) + ssh_cmd=${arg#--ssh=} + ;; -*) error "bad argument: $arg" ;; @@ -52,6 +56,7 @@ fi script=$(jq -e -r \ --argjson use_force "$force" \ + --arg ssh_cmd "$ssh_cmd" \ --arg target_spec "$target_spec" \ --arg origin_host "$origin_host" \ --arg origin_user "$origin_user" \ -- cgit v1.2.3