3
use File::Basename qw(&basename &dirname);
8
$file = basename( $0, '.PL', '.PLS' );
9
$file .= $^O eq 'VMS' ? '.com' : '.pl';
11
open OUT, ">$file" or die "Can't create $file: $!";
13
print "Extracting $file (with variable substitutions)\n";
15
print OUT "$Config{startperl}\n";
17
print OUT <<'!NO!SUBS!';
20
my %symlink_scripts = ('bp_bulk_load_gff.pl' => 'bp_pg_bulk_load_gff.pl');
24
foreach my $target ( keys ( %symlink_scripts ) ) {
25
unlink "$dir/".$symlink_scripts{$target} if -e "$dir/".$symlink_scripts{$target};
26
# place symlink in eval to catch error on systems that don't allow symlinks
27
eval { symlink( "$dir/$target", "$dir/".$symlink_scripts{$target} ); 1}
28
or print STDERR "Cannot create symbolic link named $dir/"
29
. $symlink_scripts{$target}
30
. " on your system for $dir/$target\n";
34
close OUT or die "Can't close $file: $!";
35
chmod 0755, $file or die "Can't reset permissions for $file: $!\n";
36
exec("$Config{'eunicefix'} $file") if $Config{'eunicefix'} ne ':';
42
symlink_scripts.pl - install script to create symbolic links
46
perl symlink_scripts.pl
50
Used during "make install".
52
This script will create a symlink in the 'installscript' directory (as defined
53
during install) to a script in that same directory. It was written to create a
54
symlink with the name 'bp_pg_bulk_load_gff.pl' that targeted
55
'bp_bulk_load_gff.pl' but can be extended by adding files to the
56
%symlink_scripts hash.
58
Perl function 'symlink' is used to keep the script from crashing on systems
59
that don't allow symbolic linking.
69
User feedback is an integral part of the evolution of this and other
70
Bioperl modules. Send your comments and suggestions preferably to
71
the Bioperl mailing list. Your participation is much appreciated.
73
bioperl-l@bioperl.org - General discussion
74
http://bioperl.org/wiki/Mailing_lists - About the mailing lists
78
Report bugs to the Bioperl bug tracking system to help us keep track
79
of the bugs and their resolution. Bug reports can be submitted via the
82
http://bugzilla.open-bio.org/
84
=head1 AUTHOR - Ben Faga