=== modified file 'zsh-functions/confz_vserver_init' --- zsh-functions/confz_vserver_init 2016-12-14 09:17:50 +0000 +++ zsh-functions/confz_vserver_init 2015-12-09 15:42:57 +0000 @@ -11,30 +11,16 @@ confz_deployed_system_check() { checkvars path source + if [[ ${vars[source]} == */ ]]; then + do_command=( rsync -aAH ${vars[source]} ${vars[path]}/ ) + else + do_command=( tar -xpC ${vars[path]} -f ${vars[source]} ) + fi + fail_reason="${vars[path]}/bin missing" [[ -e ${vars[path]}/bin ]] } -confz_deployed_system_do() { - case ${vars[source]} in - (*/) - rsync -aAH ${vars[source]} ${vars[path]}/ || return $?;; - (scp:*.(tbz|tbz2|bz2)) - scp -q ${vars[source]} /dev/stdout | bzip2 -d | tar -xpC ${vars[path]} - return $[ $pipestatus[1] | $pipestatus[2] | $pipestatus[3] ];; - (scp:*.(tgz|gz)) - scp -q ${vars[source]} /dev/stdout | gzip -d | tar -xpC ${vars[path]} - return $[ $pipestatus[1] | $pipestatus[2] | $pipestatus[3] ];; - (scp:*.xz) - scp -q ${vars[source]} /dev/stdout | xz -d | tar -xpC ${vars[path]} - return $[ $pipestatus[1] | $pipestatus[2] | $pipestatus[3] ];; - (scp:*) - scp -q ${vars[source]} /dev/stdout | tar -xpC ${vars[path]} - return $[ $pipestatus[1] | $pipestatus[2] ];; - (*) - tar -xpC ${vars[path]} -f ${vars[source]} || return $?;; - esac -} # create required directories confz_vserver_run_dirs_check() {