summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2011-03-19 20:22:08 +0100
committerDaniel Friesel <derf@finalrewind.org>2011-03-19 20:22:08 +0100
commitb62be25f0bbf8617fb4d288df9bc462985a2d6cd (patch)
tree3ba2e96789b38f89b22b3f7ed0946248898b1406 /bin
parentdcebfc77de8884440e7812b9468cfaa493541d77 (diff)
checklinks: Make directory autocreation actually work
Diffstat (limited to 'bin')
-rwxr-xr-xbin/checklinks8
1 files changed, 4 insertions, 4 deletions
diff --git a/bin/checklinks b/bin/checklinks
index 0a522b1..3150293 100755
--- a/bin/checklinks
+++ b/bin/checklinks
@@ -25,11 +25,11 @@ sub mkdirs {
# the last element is the file
pop(@dirs);
- foreach (@dirs) {
- if (not -d "$path/$_") {
- mkdir("$path/$_") or die("Can't create $path/$_: $!");
+ for my $dir (@dirs) {
+ if (not -d "$path/$dir") {
+ mkdir("$path/$dir") or die("Can't create $path/$dir: $!");
}
- $path .= $_;
+ $path .= "/$dir";
}
return;
}