summaryrefslogtreecommitdiff
path: root/sedsubst
diff options
context:
space:
mode:
authorAdrian Thurston <thurston@colm.net>2019-09-12 11:40:40 -0600
committerAdrian Thurston <thurston@colm.net>2019-09-12 11:40:40 -0600
commit903a1c125624990135162f84ea6a67c1df3954c3 (patch)
tree0cd93208abeff79a4e95301f7817b7b3238ba396 /sedsubst
parent29650a2d92a63b909a2d6fea677a24af6907e340 (diff)
downloadcolm-903a1c125624990135162f84ea6a67c1df3954c3.tar.gz
put just one sedsubst in the root and use that in Makefiles
Diffstat (limited to 'sedsubst')
-rwxr-xr-xsedsubst12
1 files changed, 12 insertions, 0 deletions
diff --git a/sedsubst b/sedsubst
new file mode 100755
index 00000000..da01055e
--- /dev/null
+++ b/sedsubst
@@ -0,0 +1,12 @@
+#/bin/sh
+#
+
+source=$1
+output=$2
+mode=$3
+shift 3;
+
+echo "sedsubst: generating $output from $source"
+test -f $output && rm -f $output
+sed "$@" $source > $output
+chmod $mode $output