summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTing-Wei Lan <lantw@src.gnome.org>2019-08-28 15:58:30 +0800
committerPeng Wu <alexepico@gmail.com>2019-08-29 15:13:14 +0800
commit75806735002f940927648b5abd04a4b6704518fc (patch)
tree0776a73279ffb926264c6cacbc17f481cdcef902
parent197e1b6c16608956141cd3668d35e4c22d18027e (diff)
downloadibus-libpinyin-75806735002f940927648b5abd04a4b6704518fc.tar.gz
ibus-libpinyin-75806735002f940927648b5abd04a4b6704518fc.tar.xz
ibus-libpinyin-75806735002f940927648b5abd04a4b6704518fc.zip
don't use sed -i
sed -i is a non-standard feature which may have different syntax or meaning depending on the implementation. It is better to use a temporary file instead of relying on a sed command implementing the feature in the same way as GNU sed.
-rw-r--r--data/Makefile.am7
1 files changed, 4 insertions, 3 deletions
diff --git a/data/Makefile.am b/data/Makefile.am
index 169620c..e3732ea 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -66,9 +66,10 @@ desktop_in_files = \
desktop_files = $(desktop_in_files:.desktop.in=.desktop)
$(desktop_files): $(desktop_in_files) Makefile
- $(AM_V_GEN)$(MSGFMT) --desktop --template $< -d $(top_srcdir)/po -o $@
- sed -i -e 's|@libexecdir[@]|$(libexecdir)|g' \
- -e 's|@pkgdatadir[@]|$(pkgdatadir)|g' $@
+ $(AM_V_GEN)$(MSGFMT) --desktop --template $< -d $(top_srcdir)/po -o $@.tmp
+ sed -e 's|@libexecdir[@]|$(libexecdir)|g' \
+ -e 's|@pkgdatadir[@]|$(pkgdatadir)|g' $@.tmp > $@
+ rm $@.tmp
desktopdir=$(datadir)/applications
desktop_DATA = $(desktop_files)