[hackers] [wmii] Removed PLAN9BASE config.mk knob in favor of wmii9rc script. Still not an ideal solution.

From: Kris Maglione <jg_AT_suckless.org>
Date: Sat Mar 03 15:43:54 2007

changeset: 1988:419a897e2b46
tag: tip
user: Kris Maglione <jg_AT_suckless.org>
date: Sat Mar 03 09:42:06 2007 -0500
summary: Removed PLAN9BASE config.mk knob in favor of wmii9rc script. Still not an ideal solution.

diff -r d4a2adf196c3 -r 419a897e2b46 Makefile
--- a/Makefile Sat Mar 03 02:23:22 2007 -0500
+++ b/Makefile Sat Mar 03 09:42:06 2007 -0500
@@ -9,7 +9,7 @@ SRC = area.c bar.c client.c column.c dra
         geom.c key.c main.c mouse.c rule.c printevent.c util.c view.c
 OBJ = ${SRC:.c=.o}
 MAN1 = wmii wmiir wmiiwm wmiiloop
-SCRIPTS = wmii wmiir wmiiloop
+SCRIPTS = wmii wmiir wmiiloop wmii9rc
 BIN = wmiiwm wmii9menu
 
 all: options ${BIN}
@@ -74,9 +74,7 @@ install: all
         @echo installing scripts to ${DESTDIR}${CONFPREFIX}/wmii-${CONFVERSION}
         @mkdir -p -m 0755 ${DESTDIR}${CONFPREFIX}/wmii-${CONFVERSION}
         @cd rc; for i in *; do \
- sed "s|CONFPREFIX|${CONFPREFIX}|g; \
- s|PLAN9BASE|${PLAN9BASE}|g" \
- $$i \
+ sed "s|CONFPREFIX|${CONFPREFIX}|g" $$i \
>${DESTDIR}${CONFPREFIX}/wmii-${CONFVERSION}/$$i; \
                 chmod 755 ${DESTDIR}${CONFPREFIX}/wmii-${CONFVERSION}/$$i; \
          done
diff -r d4a2adf196c3 -r 419a897e2b46 client.c
--- a/client.c Sat Mar 03 02:23:22 2007 -0500
+++ b/client.c Sat Mar 03 09:42:06 2007 -0500
@@ -45,7 +45,7 @@ create_client(Window w, XWindowAttribute
         XSetWindowBorderWidth(blz.dpy, c->win, 0);
         XAddToSaveSet(blz.dpy, c->win);
 
- fwa.override_redirect = 1;
+ fwa.override_redirect = True;
         fwa.background_pixmap = ParentRelative;
         fwa.backing_store = Always;
         fwa.event_mask =
diff -r d4a2adf196c3 -r 419a897e2b46 config.mk
--- a/config.mk Sat Mar 03 02:23:22 2007 -0500
+++ b/config.mk Sat Mar 03 09:42:06 2007 -0500
@@ -9,7 +9,6 @@ CONFPREFIX = ${PREFIX}/etc
 CONFPREFIX = ${PREFIX}/etc
 MANPREFIX = ${PREFIX}/share/man
 AWKPATH = /usr/bin/awk
-PLAN9BASE = $${PLAN9:-/usr/local/plan9}
 
 X11INC = /usr/X11R6/include
 X11LIB = /usr/X11R6/lib
diff -r d4a2adf196c3 -r 419a897e2b46 rc/rc.wmii
--- a/rc/rc.wmii Sat Mar 03 02:23:22 2007 -0500
+++ b/rc/rc.wmii Sat Mar 03 09:42:06 2007 -0500
@@ -1,4 +1,4 @@
-#!PLAN9BASE/bin/rc
+#!/usr/bin/env wmii9rc
 # WMII Configuration
 
 oldpath=$path
diff -r d4a2adf196c3 -r 419a897e2b46 wmii
--- a/wmii Sat Mar 03 02:23:22 2007 -0500
+++ b/wmii Sat Mar 03 09:42:06 2007 -0500
@@ -5,10 +5,8 @@ export WMII_NS_DIR="/tmp/ns.$USER.${DISP
 export WMII_NS_DIR="/tmp/ns.$USER.${DISPLAY%.0}"
 export WMII_ADDRESS="unix!$WMII_NS_DIR/wmii"
 
-if [ -x /usr/local/plan9/bin/rc ]; then
+if wmii9rc; then
         WMIIRC=`PATH="$WMII_CONFPATH:$PATH" which rc.wmii`
-elif [ -x "$PLAN9/bin/rc" ]; then
- WMIIRC="$PLAN9/bin/rc `PATH="$WMII_CONFPATH:$PATH" which rc.wmii`"
 else
         WMIIRC=`PATH="$WMII_CONFPATH:$PATH" which wmiirc`
 fi
diff -r d4a2adf196c3 -r 419a897e2b46 wmii9rc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/wmii9rc Sat Mar 03 09:42:06 2007 -0500
@@ -0,0 +1,14 @@
+#!/bin/sh
+RC=""
+for i in "$PLAN9" /usr/local/plan9 /usr/local/9 /opt/plan9 /opt/9 /usr/plan9 /usr/9; do
+ if [ -d "$i" -a -x "$i/bin/rc" ]; then
+ RC="$i/bin/rc"
+ break;
+ fi
+done
+
+if [ ! -n "$RC" ]; then
+ exit 1
+elif [ "X$@" != "X" ]; then
+ $RC $@
+fi
\ No newline at end of file
Received on Sat Mar 03 2007 - 15:43:54 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 15:56:07 UTC