projects
/
dupemerge
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
790ad0c
)
parameterize the prefix length and ensure we don't have files with names too short
author
Zygo Blaxell
<zblaxell@esightcorp.com>
Thu, 13 May 2010 20:40:49 +0000
(16:40 -0400)
committer
Zygo Blaxell
<zblaxell@esightcorp.com>
Thu, 13 May 2010 20:40:49 +0000
(16:40 -0400)
dm6
patch
|
blob
|
history
diff --git
a/dm6
b/dm6
index a5d56a6545a59258d2742e7dcfcedd0a4be5d843..b0ff96b84b633c717bf0516038f74e6ae2be494d 100755
(executable)
--- a/
dm6
+++ b/
dm6
@@
-69,10
+69,13
@@
sub link_files {
my $link_dir = shift @ARGV;
(-d $link_dir) or usage;
my $link_dir = shift @ARGV;
(-d $link_dir) or usage;
+my $prefix_length = 3;
+
sub slash_prefix {
my ($file) = @_;
sub slash_prefix {
my ($file) = @_;
- my $prefix = substr($file, 0, 3);
- my $suffix = substr($file, 3);
+ $file .= '_' x (length($file) + 1 - $prefix_length) if length($file) + 1 < $prefix_length;
+ my $prefix = substr($file, 0, $prefix_length);
+ my $suffix = substr($file, $prefix_length);
$prefix =~ s:(.):$1/:osg;
chop($prefix);
return ($prefix, $suffix);
$prefix =~ s:(.):$1/:osg;
chop($prefix);
return ($prefix, $suffix);