wmii

git clone git://oldgit.suckless.org/wmii/
Log | Files | Refs | README | LICENSE

commit 2d6e3b91e51905dac87a42b0331677e6f6553315
parent ca77b0cd999e906ec3cfdf943e51215c43af63c1
Author: Kris Maglione <jg@suckless.org>
Date:   Sat, 14 Apr 2007 00:07:52 -0400

Make sure that the 'read' command exists when running rc.wmii.

Diffstat:
rc/rc.wmii.rc | 22+++++++++++++++++-----
1 file changed, 17 insertions(+), 5 deletions(-)

diff --git a/rc/rc.wmii.rc b/rc/rc.wmii.rc @@ -4,11 +4,6 @@ oldpath=$path path=($PLAN9/bin $path) -if(echo $0 | grep -vs '/rc.wmii$') { - echo Fatal: This file should only be run as rc.wmii >[1=2] - exit badname -} - MODKEY=Mod1 UP=k DOWN=j @@ -40,6 +35,23 @@ fn config_whatis { echo `{{path=$confpath whatis $prog} | grep -v '=|^fn '} $* } +if(echo $0 | grep -vs '/rc.wmii$') { + echo Fatal: This file should only be run as rc.wmii >[1=2] + exit badname +} + +if(! text -x $PLAN9/read) { + echo Can't find the '''read''' command >[1=2] + xmessage -file - <<! & + exec `{config_whatis wmiirc} +} +rc.wmii can't run: + You have a Plan 9 utilities installed, but are missing the 'read' command. + This likely means that you have an out-of-date 9base installed. + +wmiirc will be run instead. +! + # Source Variables, &c local = `{config_whatis rc.wmii.local} . <{awk '//; /^# Overrides/ { exit }' $local </dev/null}