tchdir fix - gitzone - git-based zone management tool for static and dynamic domains HTML git clone https://git.parazyd.org/gitzone DIR Log DIR Files DIR Refs --- DIR commit 4956a8bbf1abe8bf0f6dfef2468f9acb13cb384a DIR parent 10c894f9895726eb0f5894ac0fdff3fcbee17eef HTML Author: tg(x) <*@tg-x.net> Date: Sun, 27 Feb 2011 20:10:40 +0100 chdir fix Diffstat: M bin/gitzone | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) --- DIR diff --git a/bin/gitzone b/bin/gitzone t@@ -16,17 +16,18 @@ use File::Basename qw/fileparse basename/; @ARGV >= 2 or die "Usage: gitzone /path/to/gitzone.conf <command>\n"; basename(realpath) eq '.git' or die "gitzone has to be run from a .git directory\n"; + +my $lock_file = realpath '.gitzone-lock'; +my $list_file = realpath '.gitzone-list'; chdir '..'; -our ($zone_dir, $git, $named_checkzone, $rndc, $class, $default_view, $update_record, $unrestricted_includes, $max_depth, $repos, $verbosity); our $user = getpwuid $<; our $repo = basename realpath; +our ($zone_dir, $git, $named_checkzone, $rndc, $class, $default_view, $update_record, $unrestricted_includes, $max_depth, $repos, $verbosity); my ($config_file, $cmd) = @ARGV; do $config_file or die "Can't load config: $!\n"; -my $lock_file = realpath '.gitzone-lock'; -my $list_file = realpath '.gitzone-list'; my (%files, %inc_files, @zones, $date); delete $ENV{GIT_DIR};