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:
mycroft 2003-01-10 14:25:22 +00:00
parent 5ede4f8cb7
commit d296aa91c5

View file

@ -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