summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortg(x) <*@tg-x.net>2011-02-27 19:10:40 (GMT)
committer tg(x) <*@tg-x.net>2013-06-05 15:58:41 (GMT)
commit4956a8bbf1abe8bf0f6dfef2468f9acb13cb384a (patch)
treedf0eb8b3587c20130ac86e82cca3ee5d426d7d00
parent10c894f9895726eb0f5894ac0fdff3fcbee17eef (diff)
chdir fix
-rwxr-xr-xbin/gitzone7
1 files changed, 4 insertions, 3 deletions
diff --git a/bin/gitzone b/bin/gitzone
index 4907c8f..476f55d 100755
--- a/bin/gitzone
+++ b/bin/gitzone
@@ -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};