From edd1050b7ef9895b3b730538cd5d69f831c61384 Mon Sep 17 00:00:00 2001 From: Clement Chauplannaz Date: Wed, 8 May 2013 09:27:06 +0200 Subject: [PATCH] Compatibility with BSD version of `sed' Rewrite calls to `sed' to remove '-r/--regexp-extended' parameter, which is not supported by BSD `sed'. BSD `sed' does implement regular expressions, but enables them with parameter '-E' which in turn is not officially supported by GNU `sed' - in fact it is implemented but not documented. Signed-off-by: Clement Chauplannaz [yann.morin.1998@free.fr: tweak the root-menu hunk] Signed-off-by: Yann E. MORIN --- bootstrap | 2 +- configure.ac | 4 +--- libs/images/Makefile.am | 4 ++-- scripts/ksync.sh | 4 ++-- scripts/version.sh | 2 +- utils/Makefile.am | 2 +- 6 files changed, 8 insertions(+), 10 deletions(-) diff --git a/bootstrap b/bootstrap index ef523d3..4dd9407 100755 --- a/bootstrap +++ b/bootstrap @@ -2,7 +2,7 @@ set -e printf "Creating macrodir...\n" -macrodir="$( sed -r -e '/^AC_CONFIG_MACRO_DIR\(\[(.*)\]\)/!d;' \ +macrodir="$( sed -e '/^AC_CONFIG_MACRO_DIR(\[\(.*\)\])/!d;' \ -e 's//\1/;' \ configure.ac \ )" diff --git a/configure.ac b/configure.ac index ad0cf5f..554974b 100644 --- a/configure.ac +++ b/configure.ac @@ -93,9 +93,7 @@ AC_ARG_ENABLE( [yes], [root_menu=Configuration], [no], [root_menu=], [# Escape the $ signs, otherwise they would get munged by make - # Also, append a space at the end, to separate the package - # name from the literal 'Configuration' - root_menu="$( echo "$enableval" |sed -r -e 's/\$/\\$$/g;' )"])]) + root_menu="$( echo "$enableval" |sed -e 's/\$/\\$$/g;' )"])]) AC_SUBST([root_menu], [${root_menu=Configuration}]) AC_ARG_ENABLE( diff --git a/libs/images/Makefile.am b/libs/images/Makefile.am index c29b1ab..009e238 100644 --- a/libs/images/Makefile.am +++ b/libs/images/Makefile.am @@ -6,8 +6,8 @@ BUILT_SOURCES = images.c images.h CLEANFILES = images.c images.h images.c: images.c_orig - $(AM_V_GEN)$(SED) -r -e 's/^static //' $< >$@ + $(AM_V_GEN)$(SED) -e 's/^static //' $< >$@ images.h: images.c_orig - $(AM_V_GEN)$(SED) -r -e '/^static (const char \*xpm_(.+)\[\]) = \{/!d; s//extern \1;/' \ + $(AM_V_GEN)$(SED) -e '/^static \(const char \*xpm_\(.\{1,\}\)\[\]\) = {/!d; s//extern \1;/' \ $< >$@ diff --git a/scripts/ksync.sh b/scripts/ksync.sh index 97fb3fe..aa7464e 100755 --- a/scripts/ksync.sh +++ b/scripts/ksync.sh @@ -20,7 +20,7 @@ k_cset_old=$( head -n 1 .version |awk '{ print $(2); }' ) # Get the kernel version eval $( head -n 5 "${k_dir}/Makefile" \ - |sed -r -e 's/^/K_/; s/"//g; s/ = ?/="/; s/$/"/;' \ + |sed -e 's/^/K_/; s/"//g; s/ = \{0,1\}/="/; s/$/"/;' \ ) k_cset="$( cd "${k_dir}"; \ git log -n 1 --pretty='format:%H' \ @@ -58,4 +58,4 @@ printf "Synced-up these changes:\n" "${k_cset_old}..${k_cset}" \ ${k_files} \ )|tee -a "scripts/ksync.log" \ - |sed -r -e 's/^/ /;' + |sed -e 's/^/ /;' diff --git a/scripts/version.sh b/scripts/version.sh index 80d1041..fbeb7df 100755 --- a/scripts/version.sh +++ b/scripts/version.sh @@ -26,7 +26,7 @@ if [ ${internal} -ne 0 ]; then fi k_ver_plain="$( printf "%s" "${k_ver}" \ - |sed -r -e 's/-rc.*//;' )" + |sed -e 's/-rc.*//;' )" case "${kf_ver}" in git) kf_ver="-$( git rev-parse --short HEAD )" diff --git a/utils/Makefile.am b/utils/Makefile.am index 57ff288..b3f55df 100644 --- a/utils/Makefile.am +++ b/utils/Makefile.am @@ -16,6 +16,6 @@ CLEANFILES = tweak EXTRA_DIST = tweak.in tweak.in.patch tweak: tweak.in - $(AM_V_GEN)$(SED) -r -e "s/@CONFIG_@/$(config_prefix)/g" \ + $(AM_V_GEN)$(SED) -e "s/@CONFIG_@/$(config_prefix)/g" \ $< >$@ @chmod +x $@ -- 2.39.2