File tree 3 files changed +12
-8
lines changed
3 files changed +12
-8
lines changed Original file line number Diff line number Diff line change 57
57
//
58
58
59
59
// save name of this script
60
- $ PROGRAM = basename (array_shift ($ argv ));
60
+ $ PROGRAM = basename (realpath ( array_shift ($ argv )), ' .php ' );
61
61
62
62
$ dir = dirname (__FILE__ );
63
63
require_once "$ dir/helpers.php " ;
64
64
65
65
// load eventum-cvs-hook.conf.php from dir of this script if it exists
66
- $ configfile = $ dir . DIRECTORY_SEPARATOR . basename ( __FILE__ , ' .php ' ) . ' . conf.php' ;
66
+ $ configfile = " $ dir/ $ PROGRAM . conf.php" ;
67
67
if (file_exists ($ configfile )) {
68
68
require_once $ configfile ;
69
69
}
Original file line number Diff line number Diff line change 38
38
// DO NOT CHANGE ANYTHING AFTER THIS LINE
39
39
//
40
40
41
+ // save name of this script
42
+ $ PROGRAM = basename (realpath (array_shift ($ argv )), '.php ' );
43
+
41
44
$ dir = dirname (__FILE__ );
42
45
require_once "$ dir/helpers.php " ;
43
46
44
- // load eventum-svn -hook.conf.php from dir of this script if it exists
45
- $ configfile = dirname ( __FILE__ ) . DIRECTORY_SEPARATOR . basename ( __FILE__ , ' .php ' ) . ' . conf.php' ;
47
+ // load eventum-git -hook.conf.php from dir of this script if it exists
48
+ $ configfile = " $ dir / $ PROGRAM . conf.php" ;
46
49
if (file_exists ($ configfile )) {
47
50
require_once $ configfile ;
48
51
}
Original file line number Diff line number Diff line change 51
51
//
52
52
// DO NOT CHANGE ANYTHING AFTER THIS LINE
53
53
//
54
+
55
+ // save name of this script
56
+ $ PROGRAM = basename (realpath (array_shift ($ argv )), '.php ' );
57
+
54
58
$ dir = dirname (__FILE__ );
55
59
require_once "$ dir/helpers.php " ;
56
60
57
61
// load eventum-svn-hook.conf.php from dir of this script if it exists
58
- $ configfile = $ dir . DIRECTORY_SEPARATOR . basename ( __FILE__ , ' .php ' ) . ' . conf.php' ;
62
+ $ configfile = " $ dir/ $ PROGRAM . conf.php" ;
59
63
if (file_exists ($ configfile )) {
60
64
require_once $ configfile ;
61
65
}
62
66
63
- // save name of this script
64
- $ PROGRAM = basename (array_shift ($ argv ));
65
-
66
67
if ($ argc < 3 ) {
67
68
error_log ("$ PROGRAM : Missing arguments, got " . ($ argc - 1 ) . ", expected 2 " );
68
69
exit (1 );
You can’t perform that action at this time.
0 commit comments