commit a6c8166ffbe41357b99e8127b4e9c98a64e0cb33
parent abaa734d28547b3aea25e32bc35e412754626b22
Author: Jan Pobrislo <ccx@webprojekty.cz>
Date: Fri, 2 Feb 2018 14:45:29 +0100
Allow supllying pattern to ignore files and directories in deployed to directory
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/zsh-functions/confz_vserver_init b/zsh-functions/confz_vserver_init
@@ -10,13 +10,14 @@ zmodload -F zsh/stat b:zstat
# deploy filesystem image from directory, rsync or tarball
confz_deployed_system_check() {
checkvars path source
+ defvar ignore_pattern ''
local existing_entries
fail_reason="${vars[path]}/.confz_deployed missing"
if [[ -e ${vars[path]}/.confz_deployed ]]; then
return 0
else
- existing_entries=( ${vars[path]}/*(DN) )
+ existing_entries=( ${vars[path]}/*~${vars[path]}/${~vars[ignore_pattern]}(DN) )
if (($#existing_entries)); then
die "Found $#existing_entries existing entries in ${vars[path]} but no .confz_deployed"
else