diff options
-rwxr-xr-x | draklive | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -301,6 +301,13 @@ sub moddeps_closure { sub directory_usage { first(split /\s/, `du -sb $_[0]`) } +#- expand only if the pattern contains '*' +#- and matches dot characters (like shell dotglob) +sub glob__ { + my ($pattern) = @_; + $pattern =~ /\*/ ? glob_($pattern) : $pattern; +} + sub run_ { my $options = ref $_[0] eq 'HASH' ? shift @_ : {}; my @cmd = @_; @@ -674,7 +681,7 @@ sub copy_files_to { my ($source, $dest, $o_perm) = @$_; $dest = $root . '/' . $dest; mkdir_p($dest =~ m|/$| ? $dest : dirname($dest)); - my @sources = glob_($live->{settings}{config_root} . '/' . $source); + my @sources = glob__($live->{settings}{config_root} . '/' . $source); print STDERR "copying @sources to $dest\n"; cp_f(@sources, $dest); chmod $o_perm, $dest if $o_perm; |