[hackers] [wmii] Cleanup pre-install text file filters. || Kris Maglione

From: <hg_AT_suckless.org>
Date: Mon, 28 Sep 2009 21:36:07 +0000 (UTC)

changeset: 2488:7f49103fde51
user: Kris Maglione <jg_AT_suckless.org>
date: Mon Sep 28 17:24:01 2009 -0400
files: cmd/Makefile cmd/wihack.sh cmd/wmii9rc.sh cmd/wmiistartrc.sh man/Makefile man/wmii.man1 mk/hdr.mk mk/wmii.mk rc/Makefile rc/wmiirc.sh
description:
Cleanup pre-install text file filters.

diff -r d67429d1fa23 -r 7f49103fde51 cmd/Makefile
--- a/cmd/Makefile Mon Sep 28 13:43:34 2009 -0400
+++ b/cmd/Makefile Mon Sep 28 17:24:01 2009 -0400
@@ -15,12 +15,6 @@
         wmiistartrc
 
 OFILES = util.o
-FILTER = sed "s|CONFPREFIX|$(ETC)|g; \
- s|CONFVERSION|$(CONFVERSION)|g; \
- s|P9PATHS|$(P9PATHS)|g; \
- s|LIBDIR|$(LIBDIR)|g; \
- s|BINSH|$(BINSH)|g; \
- s|AWKPATH|$(AWKPATH)|g"
 
 LDFLAGS += -lfmt -lutf
 CFLAGS += $(INCX11)
diff -r d67429d1fa23 -r 7f49103fde51 cmd/wihack.sh
--- a/cmd/wihack.sh Mon Sep 28 13:43:34 2009 -0400
+++ b/cmd/wihack.sh Mon Sep 28 17:24:01 2009 -0400
@@ -36,7 +36,7 @@
 if [ ! -u "`which $1`" -a ! -g "`which $1`" ]
 then
         export LD_PRELOAD=libwmii_hack.so
- export LD_LIBRARY_PATH="LIBDIR${LD_LIBRARY_PATH:+:}${LD_LIBRARY_PATH}"
+ export LD_LIBRARY_PATH="@LIBDIR@${LD_LIBRARY_PATH:+:}${LD_LIBRARY_PATH}"
 else
         unset WMII_HACK_TRANSIENT WMII_HACK_TYPE WMII_HACK_TAGS
 fi
diff -r d67429d1fa23 -r 7f49103fde51 cmd/wmii9rc.sh
--- a/cmd/wmii9rc.sh Mon Sep 28 13:43:34 2009 -0400
+++ b/cmd/wmii9rc.sh Mon Sep 28 17:24:01 2009 -0400
@@ -1,7 +1,7 @@
 #!/bin/sh -f
 RC=""
 IFS=:
-for i in "$PLAN9" `echo "P9PATHS"`; do
+for i in "$PLAN9" `echo "@P9PATHS@"`; do
         if [ -d "$i" -a -x "$i/bin/rc" ]; then
                 export PLAN9="$i"
                 RC="$i/bin/rc"
diff -r d67429d1fa23 -r 7f49103fde51 cmd/wmiistartrc.sh
--- a/cmd/wmiistartrc.sh Mon Sep 28 13:43:34 2009 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,20 +0,0 @@
-#!BINSH -f
-# start wmiirc
-
-export home="$HOME"
-lconf="$home/.wmiiCONFVERSION"
-gconf="CONFPREFIX/wmiiCONFVERSION"
-
-export WMII_CONFPATH="$lconf:$gconf"
-#export POSIXLY_CORRECT=gnu_hippies
-
-which="$(which which)"
-if wmii9rc; then
- WMIIRC="$(PATH="$WMII_CONFPATH:$PATH" $which rc.wmii)"
-else
- WMIIRC="$(PATH="$WMII_CONFPATH:$PATH" $which wmiirc)"
-fi
-
-mkdir $lconf 2>/dev/null && $gconf/welcome &
-"$WMIIRC" "$@" || exec "$gconf/wmiirc" "$@"
-
diff -r d67429d1fa23 -r 7f49103fde51 man/Makefile
--- a/man/Makefile Mon Sep 28 13:43:34 2009 -0400
+++ b/man/Makefile Mon Sep 28 17:24:01 2009 -0400
@@ -11,11 +11,5 @@
 
 $(TARG): Makefile $(ROOT)/mk/wmii.mk header.t2t
 
-FILTER = sed "s|CONFPREFIX|$(ETC)|g; \
- s|CONFVERSION|$(CONFVERSION)|g; \
- s|P9PATHS|$(P9PATHS)|g; \
- s|AWKPATH|$(AWKPATH)|g; \
- s|VERSION|$(VERSION)|g"
-
 include ${ROOT}/mk/man.mk
 
diff -r d67429d1fa23 -r 7f49103fde51 man/wmii.man1
--- a/man/wmii.man1 Mon Sep 28 13:43:34 2009 -0400
+++ b/man/wmii.man1 Mon Sep 28 17:24:01 2009 -0400
@@ -145,7 +145,7 @@
 actually be any executable file. It is executed usually by
 selecting it from the actions menu. You can customize an action
 by copying it from the global action directory
-'CONFPREFIX/wmii-3.5' to '$HOME/.wmii-3.5' and then
+'@CONFPREFIX@/wmii-3.5' to '$HOME/.wmii-3.5' and then
 editing the copy to fit your needs. Of course you can also
 create your own actions there; make sure that they are
 executable.
@@ -431,9 +431,9 @@
 
 : /tmp/ns.$USER.${DISPLAY%.0}/wmii
         The wmii socket file which provides a 9P service.
-: CONFPREFIX/wmii-3.5
+: @CONFPREFIX@/wmii_AT_CONFVERSION@
         Global action directory.
-: $HOME/.wmii-3.5
+: $HOME/.wmii_AT_CONFVERSION@
         User-specific action directory. Actions are first searched here.
 :
 
diff -r d67429d1fa23 -r 7f49103fde51 mk/hdr.mk
--- a/mk/hdr.mk Mon Sep 28 13:43:34 2009 -0400
+++ b/mk/hdr.mk Mon Sep 28 17:24:01 2009 -0400
@@ -18,9 +18,10 @@
 MKCFG:=${shell $(MKCFGSH)}
 MKCFG!=${MKCFGSH}
 include $(MKCFG)
+
 # and this:
 # Try to find a sane shell. /bin/sh is a last resort, because it's
-# usually bash on Linux, which means, it's painfully slow.
+# usually bash on Linux, which means it's painfully slow.
 BINSH := $(shell \
            if [ -x /bin/dash ]; then echo /bin/dash; \
            elif [ -x /bin/ksh ]; then echo /bin/ksh; \
diff -r d67429d1fa23 -r 7f49103fde51 mk/wmii.mk
--- a/mk/wmii.mk Mon Sep 28 13:43:34 2009 -0400
+++ b/mk/wmii.mk Mon Sep 28 17:24:01 2009 -0400
@@ -5,5 +5,13 @@
 VERSION != echo $(VERS)
 CONFVERSION = -hg
 COPYRIGHT = ©2009 Kris Maglione
-CFLAGS += '-DVERSION=\"$(VERSION)\"' '-DCOPYRIGHT=\"$(COPYRIGHT)\"'
 
+CFLAGS += '-DVERSION=\"$(VERSION)\"' '-DCOPYRIGHT=\"$(COPYRIGHT)\"' \
+ '-DCONFVERSION=\"$(CONFVERSION)\"' '-DCONFPREFIX=\"$(ETC)\"'
+FILTER = sed "s|@CONFPREFIX@|$(ETC)|g; \
+ s|@CONFVERSION@|$(CONFVERSION)|g; \
+ s|@P9PATHS@|$(P9PATHS)|g; \
+ s|@LIBDIR@|$(LIBDIR)|g; \
+ s|@BINSH@|$(BINSH)|g; \
+ s|@AWKPATH@|$(AWKPATH)|g"
+
diff -r d67429d1fa23 -r 7f49103fde51 rc/Makefile
--- a/rc/Makefile Mon Sep 28 13:43:34 2009 -0400
+++ b/rc/Makefile Mon Sep 28 17:24:01 2009 -0400
@@ -7,10 +7,4 @@
         wmiirc \
         welcome
 
-FILTER = sed "s|CONFPREFIX|$(ETC)|g; \
- s|CONFVERSION|$(CONFVERSION)|g; \
- s|P9PATHS|$(P9PATHS)|g; \
- s|BINSH|$(BINSH)|g; \
- s|AWKPATH|$(AWKPATH)|g"
-
 include $(ROOT)/mk/many.mk
diff -r d67429d1fa23 -r 7f49103fde51 rc/wmiirc.sh
--- a/rc/wmiirc.sh Mon Sep 28 13:43:34 2009 -0400
+++ b/rc/wmiirc.sh Mon Sep 28 17:24:01 2009 -0400
@@ -1,4 +1,4 @@
-#!BINSH -f
+#!@BINSH@ -f
 # Configure wmii
 wmiiscript=wmiirc # For wmii.sh
 . wmii.sh
Received on Mon Sep 28 2009 - 21:36:07 UTC

This archive was generated by hypermail 2.2.0 : Mon Sep 28 2009 - 21:48:06 UTC