summaryrefslogtreecommitdiff
path: root/make/console.pm
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2015-02-24 00:07:33 +0000
committerPeter Powell <petpow@saberuk.com>2015-03-06 16:13:11 +0000
commit88bfcabe027216022df7b6f410f0dd862a92128d (patch)
treed11fb6c605cde635a7d2b2af20fe7eb115ac151f /make/console.pm
parent245c2d9d43d433a8ec2c71741c4e0c5281f5c0a8 (diff)
Create installation directories with make install not configure.
This fixes system-wide installations requiring root in order to create directories.
Diffstat (limited to 'make/console.pm')
-rw-r--r--make/console.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/make/console.pm b/make/console.pm
index 9be5ef47c..045df8a70 100644
--- a/make/console.pm
+++ b/make/console.pm
@@ -80,13 +80,13 @@ sub prompt_bool($$$) {
return $answer =~ /y/i;
}
-sub prompt_dir($$$) {
- my ($interactive, $question, $default) = @_;
+sub prompt_dir($$$;$) {
+ my ($interactive, $question, $default, $create_now) = @_;
my ($answer, $create);
do {
$answer = rel2abs(prompt_string($interactive, $question, $default));
$create = prompt_bool($interactive && !-d $answer, "$answer does not exist. Create it?", 'y');
- if ($create) {
+ if ($create && $create_now) {
my $mkpath = eval {
mkpath($answer, 0, 0750);
return 1;