projects
/
carnet-tools-cn.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
r76: i jos i changelog
[carnet-tools-cn.git]
/
cp-update
diff --git
a/cp-update
b/cp-update
index
ecac2f7
..
d5b2ab2
100755
(executable)
--- a/
cp-update
+++ b/
cp-update
@@
-69,7
+69,6
@@
$UsageLong = "
-i | --insert-after x Insert after this/matching line.
-f | --insert-before x Insert before this/matching line.
-i | --insert-after x Insert after this/matching line.
-f | --insert-before x Insert before this/matching line.
- -R | --regexp-match Use regexp mode for line matching.
- Manipulating block marks:
- Manipulating block marks:
@@
-120,6
+119,7
@@
use constant DO_INSERT => 1;
# Operation defaults
$InsertRemove = DO_INSERT;
$Placement = APPEND_AT_END;
# Operation defaults
$InsertRemove = DO_INSERT;
$Placement = APPEND_AT_END;
+$RegexpMatch = 1;
$Comment = '#';
$CommentEnd = '';
$MatchLine = '';
$Comment = '#';
$CommentEnd = '';
$MatchLine = '';
@@
-166,7
+166,7
@@
while (@ARGV) {
$Placement = INSERT_ON_TOP;
}
elsif (/^-R$/ || /^--regexp(?:-match|-mode)?$/) {
$Placement = INSERT_ON_TOP;
}
elsif (/^-R$/ || /^--regexp(?:-match|-mode)?$/) {
- $RegexpMatch = 1;
+ $RegexpMatch = 1; # it's the default
}
elsif (/^-h$/ || /^--help$/) {
die $UsageLong;
}
elsif (/^-h$/ || /^--help$/) {
die $UsageLong;