[hackers] [wmii] Try harder to find rc for plan9port/wmiirc; rename rc.wmii.local to wmiirc_local.rc || Kris Maglione

From: <hg_AT_suckless.org>
Date: Tue, 13 Oct 2009 09:39:39 +0000 (UTC)

changeset: 2540:100d238068f9
tag: tip
user: Kris Maglione <jg_AT_suckless.org>
date: Tue Oct 13 05:38:54 2009 -0400
files: .hgignore alternative_wmiircs/plan9port/Makefile alternative_wmiircs/plan9port/README alternative_wmiircs/plan9port/wmiirc
description:
Try harder to find rc for plan9port/wmiirc; rename rc.wmii.local to wmiirc_local.rc

diff -r 4d01cb38a097 -r 100d238068f9 .hgignore
--- a/.hgignore Tue Oct 13 04:56:24 2009 -0400
+++ b/.hgignore Tue Oct 13 05:38:54 2009 -0400
@@ -5,8 +5,8 @@
 \.(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 -r 4d01cb38a097 -r 100d238068f9 alternative_wmiircs/plan9port/Makefile
--- a/alternative_wmiircs/plan9port/Makefile Tue Oct 13 04:56:24 2009 -0400
+++ b/alternative_wmiircs/plan9port/Makefile Tue Oct 13 05:38:54 2009 -0400
@@ -2,7 +2,7 @@
 include $(ROOT)/mk/hdr.mk
 include $(ROOT)/mk/wmii.mk
 
-# DOCS = README
+DOCS = README
 EXECS = wmiirc
 
 DIR = $(ETC)/wmii$(CONFVERSION)/plan9port
diff -r 4d01cb38a097 -r 100d238068f9 alternative_wmiircs/plan9port/README
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/alternative_wmiircs/plan9port/README Tue Oct 13 05:38:54 2009 -0400
@@ -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_AT_CONFVERSION@/wmiirc_local.rc, which must
+be executable.
+
diff -r 4d01cb38a097 -r 100d238068f9 alternative_wmiircs/plan9port/wmiirc
--- a/alternative_wmiircs/plan9port/wmiirc Tue Oct 13 04:56:24 2009 -0400
+++ b/alternative_wmiircs/plan9port/wmiirc Tue Oct 13 05:38:54 2009 -0400
@@ -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 @@
 }
 
 # 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
Received on Tue Oct 13 2009 - 09:39:39 UTC

This archive was generated by hypermail 2.2.0 : Tue Oct 13 2009 - 09:48:05 UTC