commit 6b0d71843b76509b19e09629fa2f99882cc90ddb
parent 4f8a192394084c32948fe4c4ca682d8522437aff
Author: Kris Maglione <jg@suckless.org>
Date: Tue, 13 Oct 2009 05:38:54 -0400
Try harder to find rc for plan9port/wmiirc; rename rc.wmii.local to wmiirc_local.rc
Diffstat:
4 files changed, 28 insertions(+), 8 deletions(-)
diff --git a/.hgignore b/.hgignore
@@ -5,8 +5,8 @@ syntax: regexp
\.(diff|orig|rej|bak)$
\.(aux|idx|ilg|ind|log|toc)$
^cmd/(stfo|osd|wiwarp|setfocus)(/|$)
-.*/bak/
-.*_dummy\.h$
-syntax: path
+/bak/
+_dummy\.h$
+syntax: glob
config.local.mk
cmd/menu/bindings.c
diff --git a/alternative_wmiircs/plan9port/Makefile b/alternative_wmiircs/plan9port/Makefile
@@ -2,7 +2,7 @@ ROOT=../..
include $(ROOT)/mk/hdr.mk
include $(ROOT)/mk/wmii.mk
-# DOCS = README
+DOCS = README
EXECS = wmiirc
DIR = $(ETC)/wmii$(CONFVERSION)/plan9port
diff --git a/alternative_wmiircs/plan9port/README b/alternative_wmiircs/plan9port/README
@@ -0,0 +1,10 @@
+plan9port wmiirc
+================
+
+This directory contains a Plan 9 based wmiirc script. This script was
+traditionally the default wmiirc for wmii, but has been moved for
+portability reasons. To run this script, either Plan 9 from User
+Space[1] (plan9port for short) or 9base[2] is required. Modifications
+can be placed in $home/.wmii@CONFVERSION@/wmiirc_local.rc, which must
+be executable.
+
diff --git a/alternative_wmiircs/plan9port/wmiirc b/alternative_wmiircs/plan9port/wmiirc
@@ -1,4 +1,14 @@
-#!/usr/bin/env rc
+#!/bin/sh
+p="$PATH"
+which rc >/dev/null || PATH="$PLAN9:$p"
+which rc >/dev/null || PATH="/usr/local/plan9/bin:$p"
+which rc >/dev/null || PATH="/usr/local/9/bin:$p"
+which rc >/dev/null || PATH="/opt/plan9/bin:$p"
+which rc >/dev/null || PATH="/opt/9/bin:$p"
+which rc >/dev/null || PATH="/usr/plan9/bin:$p"
+which rc >/dev/null || PATH="/usr/9/bin:$p"
+test $#* '=' 0 || exec rc $0
+
cd
scriptname=$0
oldpath=$path; path=($PLAN9/bin $path)
@@ -152,10 +162,10 @@ fn Action-status {
}
# Source Variables, &c
-if(~ $0 ('' */)rc.wmii.local)
- wi_notice This file should not be named rc.wmii.local
+if(~ $0 ('' */)wmiirc_local.rc)
+ wi_notice This file should not be named wmiirc_local.rc
if not
- . `{wi_script -f rc.wmii.local}
+ . `{wi_script -f wmiirc_local.rc}
echo $wmiinormcol | wmiir create $noticebar
# Key Bindings