commit 57c7e672b93ff5d66a39dc1250420d3213365293 parent 048a23ebda88f01da56f5fecb40d621d9d43e369 Author: Jan Pobrislo <ccx@webprojekty.cz> Date: Wed, 11 Jan 2017 19:27:24 +0100 fix missing ;; Diffstat:
| M | zsh-functions/confz_vserver_init | | | 21 | ++++++++++++++------- |
1 file changed, 14 insertions(+), 7 deletions(-)
diff --git a/zsh-functions/confz_vserver_init b/zsh-functions/confz_vserver_init @@ -18,7 +18,7 @@ confz_deployed_system_check() { else existing_entries=( ${vars[path]}/*(DN) ) if (($#existing_entries)); then - die "Found $#existing_entries in ${vars[path]} but no .confz_deployed" + die "Found $#existing_entries existing entries in ${vars[path]} but no .confz_deployed" else return 1 fi @@ -30,27 +30,34 @@ confz_deployed_system_do() { result=0 case ${vars[source]} in (*/) - rsync -aAH ${vars[source]} ${vars[path]}/ || return $?;; + rsync -aAH ${vars[source]} ${vars[path]}/ || return $? + ;; (scp:*.(tbz|tbz2|bz2)) scp -q ${vars[source]#scp:} /dev/stdout | bzip2 -d | tar -xpC ${vars[path]} - result=$[ $pipestatus[1] | $pipestatus[2] | $pipestatus[3] ];; + result=$[ $pipestatus[1] | $pipestatus[2] | $pipestatus[3] ] + ;; (scp:*.(tgz|gz)) scp -q ${vars[source]#scp:} /dev/stdout | gzip -d | tar -xpC ${vars[path]} - result=$[ $pipestatus[1] | $pipestatus[2] | $pipestatus[3] ];; + result=$[ $pipestatus[1] | $pipestatus[2] | $pipestatus[3] ] + ;; (scp:*.xz) scp -q ${vars[source]#scp:} /dev/stdout | xz -d | tar -xpC ${vars[path]} - result=$[ $pipestatus[1] | $pipestatus[2] | $pipestatus[3] ];; + result=$[ $pipestatus[1] | $pipestatus[2] | $pipestatus[3] ] + ;; (scp:*) scp -q ${vars[source]#scp:} /dev/stdout | tar -xpC ${vars[path]} - result=$[ $pipestatus[1] | $pipestatus[2] ];; + result=$[ $pipestatus[1] | $pipestatus[2] ] + ;; (sftp:*) mkdir -p /root/.tmp || return $? (cd /root/.tmp && sftp ${vars[source]#sftp:}) || return $? tar -xpC ${vars[path]} -f /root/.tmp/${vars[source]:t} result=$? rm -f /root/.tmp/${vars[source]:t} + ;; (*) - tar -xpC ${vars[path]} -f ${vars[source]} || return $?;; + tar -xpC ${vars[path]} -f ${vars[source]} || return $? + ;; esac if (($result)); then return $result