Subversion Repositories DevTools

Rev

Rev 361 | Rev 369 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 361 Rev 363
Line 30... Line 30...
30
use JatsError;
30
use JatsError;
31
use JatsEnv;
31
use JatsEnv;
32
use DescPkg;
32
use DescPkg;
33
use FileUtils;
33
use FileUtils;
34
 
34
 
-
 
35
#
-
 
36
#   Under Windows we need the Win32::FileSecurity module
-
 
37
#   It only exists under windows
-
 
38
#
-
 
39
my $Win32 = eval "require Win32::FileSecurity";
-
 
40
 
35
# define Global variables
41
# define Global variables
36
#
42
#
37
my $VERSION = "2.4.1";
43
my $VERSION = "2.4.1";
38
my $PROGNAME = "create_dpkg.pl";
44
my $PROGNAME = "create_dpkg.pl";
39
 
45
 
Line 608... Line 614...
608
        {
614
        {
609
            if ( $item =~ m~/descpkg$~ )
615
            if ( $item =~ m~/descpkg$~ )
610
            {
616
            {
611
                LogFileOp("Rewrite File",$target);
617
                LogFileOp("Rewrite File",$target);
612
                TransferDescpkg( "$item", $target );
618
                TransferDescpkg( "$item", $target );
613
                CORE::chmod oct("0775"), $target;
619
                CORE::chmod oct("0664"), $target;
614
            }
620
            }
615
            else
621
            else
616
            {
622
            {
617
                #
623
                #
618
                #   Copy file to destination
624
                #   Copy file to destination
Line 632... Line 638...
632
                    }
638
                    }
633
                }
639
                }
634
                elsif (File::Copy::copy($item, $target))
640
                elsif (File::Copy::copy($item, $target))
635
                {
641
                {
636
                    LogFileOp("Copying File",$target);
642
                    LogFileOp("Copying File",$target);
-
 
643
                    #
-
 
644
                    #   Mark the file as executable by all
-
 
645
                    #   Under windows, this is tricky
-
 
646
                    #
-
 
647
                    if ( $Win32 )
-
 
648
                    {
-
 
649
                        my %hash;
-
 
650
                        $hash{Everyone} = Win32::FileSecurity::MakeMask( qw( FULL  ) );
-
 
651
                        Win32::FileSecurity::Set( $target, \%hash );
-
 
652
                    }
-
 
653
                    else
-
 
654
                    {
637
                    CORE::chmod oct("0775"), $target;
655
                        CORE::chmod oct("0775"), $target;
-
 
656
                    }
638
                }
657
                }
639
                else
658
                else
640
                {
659
                {
641
                    Error("Failed to copy file [$item] to [$target]: $!");
660
                    Error("Failed to copy file [$item] to [$target]: $!");
642
                }
661
                }