Commit 480f7d1f authored by Roland Levillain's avatar Roland Levillain
Browse files

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/.
parent edc89436
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.
......
#!/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
}
......
......@@ -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'`
#! /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
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment