Protect some substitutions with slashes -- i.e. so that /usr/pkgsrc/.../work
doesn't get the /usr/pkg part expanded accidentally.
This commit is contained in:
parent
5ede4f8cb7
commit
d296aa91c5
1 changed files with 4 additions and 3 deletions
|
@ -33,14 +33,14 @@ gen() {
|
|||
@CAT@ >> $sedfile << EOF
|
||||
s|-$1$2[ ]$|-$1$3 |g
|
||||
s|-$1$2$|-$1$3|g
|
||||
s|-$1$2\([^ "':;]*\)|-$1$3\1|g
|
||||
s|-$1$2/|-$1$3/|g
|
||||
EOF
|
||||
;;
|
||||
untransform)
|
||||
@CAT@ >> $sedfile << EOF
|
||||
s|-$1$3[ ]$|-$1$2 |g
|
||||
s|-$1$3$|-$1$2|g
|
||||
s|-$1$3\([^ "':;]*\)|-$1$2\1|g
|
||||
s|-$1$3/|-$1$2/|g
|
||||
EOF
|
||||
;;
|
||||
esac
|
||||
|
@ -51,6 +51,7 @@ EOF
|
|||
@CAT@ >> $sedfile << EOF
|
||||
s|-$1$2[ ]|-$1$3 |g
|
||||
s|-$1$2$|-$1$3|g
|
||||
s|-$1$2/|-$1$3/|g
|
||||
EOF
|
||||
;;
|
||||
esac
|
||||
|
@ -87,7 +88,7 @@ EOF
|
|||
@CAT@ >> $sedfile << EOF
|
||||
s|$2[ ]| |g
|
||||
s|$2$||g
|
||||
s|$2[^ "':;]*||g
|
||||
s|$2/[^ "':;]*||g
|
||||
EOF
|
||||
;;
|
||||
esac
|
||||
|
|
Loading…
Reference in a new issue