Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
393dfb83
Commit
393dfb83
authored
Aug 01, 2003
by
jkeiser%netscape.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't spew "which: program not found" errors all the time (bug 214558), r=justdave
parent
2a3c2708
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
48 additions
and
34 deletions
+48
-34
checksetup.pl
checksetup.pl
+48
-34
No files found.
checksetup.pl
View file @
393dfb83
...
...
@@ -379,11 +379,18 @@ checksetup.pl, and re-enter your answers.
EOT
die
"Syntax error in localconfig"
;
}
sub
LocalVarExists
($)
{
my
(
$name
)
=
@_
;
return
$
main::
{
$name
};
# if localconfig declared it, we're done.
}
my
$newstuff
=
""
;
sub
LocalVar
($$)
{
my
(
$name
,
$definition
)
=
@_
;
return
if
(
$
main::
{
$name
}
);
# if localconfig declared it, we're done.
return
if
LocalVarExists
(
$name
);
# if localconfig declared it, we're done.
$newstuff
.=
" "
.
$name
;
open
FILE
,
'>>localconfig'
;
print
FILE
(
$answer
{
$name
}
or
$definition
),
"\n\n"
;
...
...
@@ -391,7 +398,6 @@ sub LocalVar ($$)
}
#
# Set up the defaults for the --LOCAL-- variables below:
#
...
...
@@ -411,15 +417,16 @@ LocalVar('index_html', <<'END');
$index_html
=
0
;
END
my
$mysql_binaries
=
`which mysql`
;
if
(
$mysql_binaries
=~
/no mysql/
)
{
# If which didn't find it, just provide a reasonable default
$mysql_binaries
=
"/usr/bin"
;
}
else
{
$mysql_binaries
=~
s:
/
mysql
\
n$::
;
}
if
(
!
LocalVarExists
(
'mysqlpath'
))
{
my
$mysql_binaries
=
`which mysql`
;
if
(
$mysql_binaries
=~
/no mysql/
||
$mysql_binaries
eq
''
)
{
# If which didn't find it, just provide a reasonable default
$mysql_binaries
=
"/usr/bin"
;
}
else
{
$mysql_binaries
=~
s:
/
mysql
\
n$::
;
}
LocalVar
(
'mysqlpath'
,
<<
"END"
);
LocalVar
(
'mysqlpath'
,
<<
"END"
);
#
# In order to do certain functions in Bugzilla (such as sync the shadow
# database), we require the MySQL Binaries (mysql, mysqldump, and mysqladmin).
...
...
@@ -428,17 +435,19 @@ LocalVar('mysqlpath', <<"END");
# Please specify only the directory name, with no trailing slash.
\
$mysqlpath
=
"$mysql_binaries"
;
END
}
my
$cvs_executable
=
`which cvs`
;
if
(
$cvs_executable
=~
/no cvs/
)
{
# If which didn't find it, just set to blank
$cvs_executable
=
""
;
}
else
{
chomp
$cvs_executable
;
}
if
(
!
LocalVarExists
(
'cvsbin'
))
{
my
$cvs_executable
=
`which cvs`
;
if
(
$cvs_executable
=~
/no cvs/
||
$cvs_executable
eq
''
)
{
# If which didn't find it, just set to blank
$cvs_executable
=
""
;
}
else
{
chomp
$cvs_executable
;
}
LocalVar
(
'cvsbin'
,
<<
"END"
);
LocalVar
(
'cvsbin'
,
<<
"END"
);
#
# For some optional functions of Bugzilla (such as the pretty-print patch
# viewer), we need the cvs binary to access files and revisions.
...
...
@@ -446,17 +455,19 @@ LocalVar('cvsbin', <<"END");
# its location here. Please specify the full path to the executable.
\
$cvsbin
=
"$cvs_executable"
;
END
}
my
$interdiff_executable
=
`which interdiff`
;
if
(
$interdiff_executable
=~
/no interdiff/
)
{
# If which didn't find it, set to blank
$interdiff_executable
=
""
;
}
else
{
chomp
$interdiff_executable
;
}
if
(
!
LocalVarExists
(
'interdiffbin'
))
{
my
$interdiff_executable
=
`which interdiff`
;
if
(
$interdiff_executable
=~
/no interdiff/
||
$interdiff_executable
eq
''
)
{
# If which didn't find it, set to blank
$interdiff_executable
=
""
;
}
else
{
chomp
$interdiff_executable
;
}
LocalVar
(
'interdiffbin'
,
<<
"END"
);
LocalVar
(
'interdiffbin'
,
<<
"END"
);
#
# For some optional functions of Bugzilla (such as the pretty-print patch
...
...
@@ -465,23 +476,26 @@ LocalVar('interdiffbin', <<"END");
# its location here. Please specify the full path to the executable.
\
$interdiffbin
=
"$interdiff_executable"
;
END
}
my
$diff_binaries
=
`which diff`
;
if
(
$diff_binaries
=~
/no diff/
)
{
# If which didn't find it, set to blank
$diff_binaries
=
""
;
}
else
{
$diff_binaries
=~
s:
/
diff
\
n$::
;
}
if
(
!
LocalVarExists
(
'diffpath'
))
{
my
$diff_binaries
=
`which diff`
;
if
(
$diff_binaries
=~
/no diff/
||
$diff_binaries
eq
''
)
{
# If which didn't find it, set to blank
$diff_binaries
=
""
;
}
else
{
$diff_binaries
=~
s:
/
diff
\
n$::
;
}
LocalVar
(
'diffpath'
,
<<
"END"
);
LocalVar
(
'diffpath'
,
<<
"END"
);
#
# The interdiff feature needs diff, so we have to have that path.
# Please specify only the directory name, with no trailing slash.
\
$diffpath
=
"$diff_binaries"
;
END
}
LocalVar
(
'create_htaccess'
,
<<
'END'
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment