stumpwm-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [STUMP] Bug/Issue for contrib/stumpish


From: Anonymous
Subject: Re: [STUMP] Bug/Issue for contrib/stumpish
Date: Wed, 09 Mar 2011 11:14:28 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (berkeley-unix)

Mahmudul Hasan <address@hidden> writes:

> The commit 87864de773ad4b9da25f09b334ecc86fd6db117d on Dec 27,2010
> broke the contrib/stumpish script for Debian Lenny installation.

>From packages.debian.org only Lenny has GNU sed 4.1.5 which doesn't have
-E compat option. But Lenny has stumpwm package that works with old sed.

> The commit introduced a change in how the "sed" command is introduced
> with an option -E, which is not supported in standard sed.

Well, git blame says -E was added in 2006/08/07. GNU sed 4.2 released in
2009/04/30 has it while GNU sed 4.1.5 released in 2006/02/03 has not.

Can try below workaround?

%%
diff --git a/contrib/stumpish b/contrib/stumpish
index 7993921..170c76e 100755
--- a/contrib/stumpish
+++ b/contrib/stumpish
@@ -28,6 +28,11 @@ then
     DELAY=1
 fi
 
+# replace -E with -r option for old versions of GNU sed
+if ! sed -E 1p /dev/null 2>/dev/null; then
+    sed() { shift; command sed -r "$@"; }
+fi
+
 # parse C-style backslash sequences by default
 if [ "$(echo -e foo)" = foo ]; then
     echo() { builtin echo -e "$@"; }
%%



reply via email to

[Prev in Thread] Current Thread [Next in Thread]