Update of /cvsroot/mhonarc/devtools/bin
In directory subversions:/tmp/cvs-serv15978
Modified Files:
release
Log Message:
+ Added -umask option.
* Fixed some problem with -snapmode based on doing test snaps of mhonarc
project.
Index: release
===================================================================
RCS file: /cvsroot/mhonarc/devtools/bin/release,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -r1.20 -r1.21
*** release 31 Oct 2002 05:40:13 -0000 1.20
--- release 31 Oct 2002 06:20:08 -0000 1.21
***************
*** 59,65 ****
MAIN: {
- ## Make sure group has write access by default when creating files.
- umask 002;
-
## Command-line parsing
my $cwd = getcwd;
--- 59,62 ----
***************
*** 81,84 ****
--- 78,82 ----
'noversion-check', # Bypass version check
'project=s', # Project name
+ 'umask=i', # Umask for creating files
'rhost=s@', # Remote hosts to co-build on
'rshprg=s', # Remote shell program (def: rsh)
***************
*** 117,120 ****
--- 115,121 ----
die qq/Error: CVS root not defined!\n/ unless $cvsroot;
+ my $umask = $CONFIG->{'UMASK'} ||
+ oct($opt{'umask'}) ||
+ 002;
my $releases_dir = $CONFIG->{'REL_DIR'} ||
REL_DIR;
***************
*** 143,148 ****
MAIL_PRG;
! my $tar_dir = $CONFIG->{'DIST_DIRNAME'} ||
'tar';
my $arch = $opt{'arch'};
--- 144,151 ----
MAIL_PRG;
! my $tar_dirname
! = $CONFIG->{'DIST_DIRNAME'} ||
'tar';
+ my $tar_dir = join('/', $reldir, $tar_dirname);
my $arch = $opt{'arch'};
***************
*** 265,269 ****
ch_dir($testdir_parent) ||
die qq/Error: Unable to chdir to "$testdir_parent": $!\n/;
! if (!$create) {
run_prg(@cvs, 'export', '-r', $cvstag,
'-d', $testdir_basename, $project);
--- 268,272 ----
ch_dir($testdir_parent) ||
die qq/Error: Unable to chdir to "$testdir_parent": $!\n/;
! if (!$create && !$snapmode) {
run_prg(@cvs, 'export', '-r', $cvstag,
'-d', $testdir_basename, $project);
***************
*** 299,303 ****
if ($snapmode) {
run_prg('/bin/rm', '-rf', $buildroot);
! rename($testroot, $buildroot) ||
die qq/Error: Unable to rename "$testroot" to "$buildroot": $!\n/;
} else {
--- 302,306 ----
if ($snapmode) {
run_prg('/bin/rm', '-rf', $buildroot);
! change_name($testroot, $buildroot) ||
die qq/Error: Unable to rename "$testroot" to "$buildroot": $!\n/;
} else {
***************
*** 334,338 ****
}
! my $bundle = "$reldir/$tar_dir/$project-$version-$platform.tar";
my $tarroot = "$project/$version_dir";
$tarroot = $tarroot . "/$platform" if $arch;
--- 337,341 ----
}
! my $bundle = "$tar_dir/$project-$version-$platform.tar";
my $tarroot = "$project/$version_dir";
$tarroot = $tarroot . "/$platform" if $arch;
***************
*** 342,346 ****
if ( -e $distdir ) {
run_prg('/bin/chmod', 'ug+w', $distdir);
! copy_dist_bundles($distdir, "$reldir/$tar_dir");
cmd('/bin/rm', '-rf', $distdir);
--- 345,349 ----
if ( -e $distdir ) {
run_prg('/bin/chmod', 'ug+w', $distdir);
! copy_dist_bundles($distdir, $tar_dir);
cmd('/bin/rm', '-rf', $distdir);
***************
*** 361,365 ****
}
}
! run_prg('/bin/chmod', '-R', 'a-w', $buildir);
## Send mail notification (if requested)
--- 364,368 ----
}
}
! run_prg('/bin/chmod', '-R', 'a-w', $buildir) unless $snapmode;
## Send mail notification (if requested)
***************
*** 461,464 ****
--- 464,480 ----
}
+ #== Rename a file
+ #=#
+ sub change_name {
+ my $curname = shift;
+ my $newname = shift;
+
+ if ($ECHO_ONLY) {
+ print qq/rename "$curname" "$newname"\n/;
+ } else {
+ rename($curname, $newname);
+ }
+ }
+
#== Determine project release version.
#=#
***************
*** 939,942 ****
--- 955,961 ----
# by RSHELL envariable.
RSH_PRG => 'rsh',
+
+ # File creation umask. Notice how there is NO quotes used.
+ UMASK => 002,
};
---------------------------------------------------------------------
To sign-off this list, send email to majordomo(_at_)mhonarc(_dot_)org with the
message text UNSUBSCRIBE MHONARC-DEV