
* build-aux/mln_add_file, * doc/Makefile.am, * lrde-scmstats.sh: Here, as `sed -i' (with no backup file) behaves differently on GNU/Linux and Mac OS X. For more information, see: http://stackoverflow.com/questions/5694228/. --- ChangeLog | 11 +++++++++++ build-aux/mln_add_file | 8 ++++---- doc/Makefile.am | 23 ++++++++++++----------- lrde-scmstats.sh | 4 ++-- 4 files changed, 29 insertions(+), 17 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5c08e1b..b4cd1f4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2013-06-17 Roland Levillain <roland@lrde.epita.fr> + + Use `perl -pi' instead of `sed -i' in Olena. + + * build-aux/mln_add_file, + * doc/Makefile.am, + * lrde-scmstats.sh: + Here, as `sed -i' (with no backup file) behaves differently on + GNU/Linux and Mac OS X. For more information, see: + http://stackoverflow.com/questions/5694228/. + 2013-04-18 Guillaume Lazzara <z@lrde.epita.fr> Remove unstable viewer. diff --git a/build-aux/mln_add_file b/build-aux/mln_add_file index 193784b..d81112b 100755 --- a/build-aux/mln_add_file +++ b/build-aux/mln_add_file @@ -1,6 +1,6 @@ #!/bin/sh -# Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE). +# Copyright (C) 2009, 2013 EPITA Research and Development Laboratory (LRDE). # # This file is part of Olena. # @@ -173,7 +173,7 @@ create it." 1>&2 line=`grep -nE '^#endif // ! ' $output_dir/all.hh | tail -n 1 | cut -d ':' -f 1` line=$(($line - 1)) - sed -i "${line}i\# include <$1> + perl -pi -e "${line}i\# include <$1> " $output_dir/all.hh } @@ -196,12 +196,12 @@ create it." 1>&2 line=`grep -nE "_SOURCES = " $test_dir/Makefile.am | tail -n 1 | cut -d ':' -f 1` line=$(($line + 1)) - sed -i "${line}i${test_bname}_SOURCES = $test_name + perl -pi -e "${line}i${test_bname}_SOURCES = $test_name " $test_dir/Makefile.am line=`grep -nE '\\\' $test_dir/Makefile.am | grep -B 1 'CLEANFILES = ' | head -n 1 | cut -d ':' -f 1` line=$(($line + 1)) - sed -i "${line}i\\\t${test_bname} \\\\" $test_dir/Makefile.am + perl -pi -e "${line}i\\\t${test_bname} \\\\" $test_dir/Makefile.am } diff --git a/doc/Makefile.am b/doc/Makefile.am index 582f40a..e10944a 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -121,9 +121,9 @@ $(srcdir)/user-refman.stamp: $(srcdir)/$(DOXYFILE).in $(REFMAN_deps) $(DOXYGEN) $(DOXYFILE_USER) rm -rf $(srcdir)/$(USER_REFMAN) ## Fix path to the main page of the documentation. - sed -i -e "s,\@relcommondocpath\@,../../,g" \ - -e "s,\@userrefman\@,$(USER_REFMAN),g" \ - `find $(USER_REFMAN).tmp/html -name '*.html'` + perl -pi -e "s,\@relcommondocpath\@,../../,g;" \ + -e "s,\@userrefman\@,$(USER_REFMAN),g" \ + `find $(USER_REFMAN).tmp/html -name '*.html'` ## FIXME: Moving directories between file systems is not portable. mv $(USER_REFMAN).tmp $(srcdir)/$(USER_REFMAN) @mv -f $@.tmp $@ @@ -212,10 +212,10 @@ install-data-local: cp -r $(srcdir)/$(USER_REFMAN)/html $(DESTDIR)$(htmldir)/$(USER_REFMAN) # Fix documentation paths chmod -R u+w $(DESTDIR)$(htmldir)/$(USER_REFMAN) - sed -i -e "s,../../../milena/doc/$(USER_REFMAN)/html,../milena/$(USER_REFMAN),g" \ - -e "s,../../../scribo/doc/$(USER_REFMAN)/html,../scribo/$(USER_REFMAN),g" \ - -e "s,../../$(USER_REFMAN)/html,../$(USER_REFMAN),g" \ - `find $(DESTDIR)$(htmldir)/$(USER_REFMAN) -name '*.html'` + perl -pi -e "s,../../../milena/doc/$(USER_REFMAN)/html,../milena/$(USER_REFMAN),g;" \ + -e "s,../../../scribo/doc/$(USER_REFMAN)/html,../scribo/$(USER_REFMAN),g;" \ + -e "s,../../$(USER_REFMAN)/html,../$(USER_REFMAN),g" \ + `find $(DESTDIR)$(htmldir)/$(USER_REFMAN) -name '*.html'` ## Try GNU chmod's X mode before resorting to something slower but ## more standard. chmod -R a+rX $(DESTDIR)$(htmldir) || \ @@ -230,7 +230,8 @@ uninstall-local: doc-teamcity: - sed -i -e "s,../../../milena/doc/$(USER_REFMAN)/html,../milena.doc,g" \ - -e "s,../../../scribo/doc/$(USER_REFMAN)/html,../scribo.doc,g" \ - -e "s,../../$(USER_REFMAN)/html,../olena.doc,g" \ - `find $(srcdir)/$(USER_REFMAN) -name '*.html'` + perl -pi \ + -e "s,../../../milena/doc/$(USER_REFMAN)/html,../milena.doc,g;" \ + -e "s,../../../scribo/doc/$(USER_REFMAN)/html,../scribo.doc,g;" \ + -e "s,../../$(USER_REFMAN)/html,../olena.doc,g" \ + `find $(srcdir)/$(USER_REFMAN) -name '*.html'` diff --git a/lrde-scmstats.sh b/lrde-scmstats.sh index f1f0073..37a68e7 100755 --- a/lrde-scmstats.sh +++ b/lrde-scmstats.sh @@ -1,6 +1,6 @@ #! /bin/sh -# Copyright (C) 2011 EPITA Research and Development Laboratory (LRDE). +# Copyright (C) 2011, 2013 EPITA Research and Development Laboratory (LRDE). # # This file is part of Olena. # @@ -40,7 +40,7 @@ DEST=/lrde/dload/olena/stats/$subdir gitstats . $DEST # Anonymize some names. -find "$DEST" -name "*.html" -exec sed -i 's/J.r.me Darbon/JD/g' {} \; +find "$DEST" -name "*.html" -exec perl -pi -e 's/J.r.me Darbon/JD/g' {} \; # Expose uploaded files. chmod -R a+rX $DEST -- 1.7.10.4