···77excludes=""
88while getopts e: o; do
99 case "\$o" in
1010- e) storeId=\$(echo "\$OPTARG" | sed -n "s|^$NIX_STORE/\\([a-z0-9]\{32\}\\)-.*|\1|p")
1010+ e) storeId=\$(echo "\$OPTARG" | $perl/bin/perl -ne "print \"\\\$1\" if m|^\Q$NIX_STORE\E/([a-z0-9]{32})-.*|")
1111 if [ -z "\$storeId" ]; then
1212 echo "-e argument must be a Nix store path"
1313 exit 1
···20202121for i in "\$@"; do
2222 if test ! -L "\$i" -a -f "\$i"; then
2323- cat "\$i" | $perl/bin/perl -pe "s|$NIX_STORE/\$excludes[a-z0-9]{32}-|$NIX_STORE/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-|g" > "\$i.tmp"
2323+ cat "\$i" | $perl/bin/perl -pe "s|\Q$NIX_STORE\E/\$excludes[a-z0-9]{32}-|$NIX_STORE/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-|g" > "\$i.tmp"
2424 if test -x "\$i"; then chmod +x "\$i.tmp"; fi
2525 mv "\$i.tmp" "\$i"
2626 fi