diff contrib/builddeb @ 28988:4f1dac94b53f stable

builddeb: use sed -i Notice that there is no space after '-i'. This makes it work on both GNU and BSD versions of sed.
author Sean Farley <sean@farley.io>
date Sat, 16 Apr 2016 12:33:21 -0700
parents ef9301ce6046
children a8256e3701be
line wrap: on
line diff
--- a/contrib/builddeb	Sun Apr 17 10:36:40 2016 -0700
+++ b/contrib/builddeb	Sat Apr 16 12:33:21 2016 -0700
@@ -67,11 +67,8 @@
     cp -r $PWD/contrib/debian debian
     chmod -R 0755 debian
 
-    # This looks like sed -i, but sed -i behaves just differently enough
-    # between BSD and GNU sed that I gave up and did the dumb thing.
-    sed "s/__VERSION__/$debver/" < $changelog > $changelog.tmp
-    date=$(date --rfc-2822)
-    sed "s/__DATE__/$date/" < $changelog.tmp > $changelog
+    sed -i.tmp "s/__VERSION__/$debver/" $changelog
+    sed -i.tmp "s/__DATE__/$(date --rfc-2822)/" $changelog
     rm $changelog.tmp
 
     debuild -us -uc -b