Skip to content

Commit

Permalink
Don't use sed -I in ./configure (#800)
Browse files Browse the repository at this point in the history
* Function-pointerize IXS/IXSRegex to reduce runtime iffelsing

* remove IsRegexString and SuppressIXSRegex

* regression tests passing

* doc updates

* Don't use sed -I in ./configure
  • Loading branch information
johnkerl authored Dec 25, 2021
1 parent 096bb9b commit 1dda1ef
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions configure
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash

set -euo pipefail

usage() {
echo "Usage: $0 [--prefix {prefix directory}], e.g. /usr/local" 2>&1
echo " or $0 [--prefix={prefix directory}], e.g. /usr/local" 2>&1
Expand Down Expand Up @@ -37,11 +39,12 @@ if [ ! -d "$prefix" ]; then
exit 1
fi

sed -I .prefix-backup 's@^PREFIX.*@PREFIX='$prefix'@' Makefile
rm Makefile.prefix-backup
ext=".prefix-backup"
sed 's@^PREFIX.*@PREFIX='$prefix'@' Makefile > Makefile.$ext
mv Makefile.$ext Makefile
echo Updated Makefile

sed -I .prefix-backup 's@^PREFIX.*@PREFIX='$prefix'@' man/Makefile
rm man/Makefile.prefix-backup
sed 's@^PREFIX.*@PREFIX='$prefix'@' man/Makefile > man/Makefile.$ext
mv man/Makefile.$ext man/Makefile
echo Updated man/Makefile

0 comments on commit 1dda1ef

Please sign in to comment.