builddeb: use sed -i stable
authorSean Farley <sean@farley.io>
Sat, 16 Apr 2016 12:33:21 -0700
branchstable
changeset 28988 4f1dac94b53f
parent 28987 023f47c5ce79
child 28989 a8256e3701be
builddeb: use sed -i Notice that there is no space after '-i'. This makes it work on both GNU and BSD versions of sed.
contrib/builddeb
--- 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