introduced CONFVERSION config.mk variable to define what folders are used to store wmii's configuration

This commit is contained in:
Denis Grelich 2007-01-03 22:20:05 +01:00
parent 1c4a68d08c
commit 3e60262324
3 changed files with 10 additions and 9 deletions

View File

@ -43,17 +43,17 @@ dist: clean
install: all
@echo installing executable file to ${DESTDIR}${PREFIX}/bin
@mkdir -p ${DESTDIR}${PREFIX}/bin
@sed 's|CONFPREFIX|${CONFPREFIX}|g; s|VERSION|${VERSION}|g' <wmii >${DESTDIR}${PREFIX}/bin/wmii
@sed 's|CONFPREFIX|${CONFPREFIX}|g; s|CONFVERSION|${CONFVERSION}|g' <wmii >${DESTDIR}${PREFIX}/bin/wmii
@cp -f wmiir ${DESTDIR}${PREFIX}/bin
@cp -f wmiiwm ${DESTDIR}${PREFIX}/bin
@chmod 755 ${DESTDIR}${PREFIX}/bin/wmii
@chmod 755 ${DESTDIR}${PREFIX}/bin/wmiir
@chmod 755 ${DESTDIR}${PREFIX}/bin/wmiiwm
@echo installing scripts to ${DESTDIR}${CONFPREFIX}/wmii-${VERSION}
@mkdir -p ${DESTDIR}${CONFPREFIX}/wmii-${VERSION}
@echo installing scripts to ${DESTDIR}${CONFPREFIX}/wmii-${CONFVERSION}
@mkdir -p ${DESTDIR}${CONFPREFIX}/wmii-${CONFVERSION}
@cd rc; for i in *; do \
sed 's|CONFPREFIX|${CONFPREFIX}|g' <$$i >${DESTDIR}${CONFPREFIX}/wmii-${VERSION}/$$i; \
chmod 755 ${DESTDIR}${CONFPREFIX}/wmii-${VERSION}/$$i; \
sed 's|CONFPREFIX|${CONFPREFIX}|g' <$$i >${DESTDIR}${CONFPREFIX}/wmii-${CONFVERSION}/$$i; \
chmod 755 ${DESTDIR}${CONFPREFIX}/wmii-${CONFVERSION}/$$i; \
done
@echo installing manual page to ${DESTDIR}${MANPREFIX}/man1
@mkdir -p ${DESTDIR}${MANPREFIX}/man1
@ -69,8 +69,8 @@ uninstall:
@rm -f ${DESTDIR}${PREFIX}/bin/wmii
@rm -f ${DESTDIR}${PREFIX}/bin/wmiir
@rm -f ${DESTDIR}${PREFIX}/bin/wmiiwm
@echo removing scripts from ${DESTDIR}${CONFPREFIX}/wmii-${VERSION}
@rm -rf ${DESTDIR}${CONFPREFIX}/wmii-${VERSION}
@echo removing scripts from ${DESTDIR}${CONFPREFIX}/wmii-${CONFVERSION}
@rm -rf ${DESTDIR}${CONFPREFIX}/wmii-${CONFVERSION}
@echo removing manual page from ${DESTDIR}${MANPREFIX}/man1
@rm -f ${DESTDIR}${MANPREFIX}/man1/wmii.1
@rm -f ${DESTDIR}${MANPREFIX}/man1/wmiir.1

View File

@ -1,5 +1,6 @@
# wmii version
VERSION = 3.5.1
CONFVERSION = 3.5
# Customize below to fit your system

4
wmii
View File

@ -1,10 +1,10 @@
#!/bin/sh
# start wmiiwm and wait for its termination
WMII_CONFPATH="$HOME/.wmii-3.5:CONFPREFIX/wmii-3.5" export WMII_CONFPATH
WMII_CONFPATH="$HOME/.wmii-CONFVERSION:CONFPREFIX/wmii-CONFVERSION" export WMII_CONFPATH
WMII_NS_DIR="/tmp/ns.$USER.${DISPLAY%.0}" export WMII_NS_DIR
WMII_ADDRESS="unix!$WMII_NS_DIR/wmii" export WMII_ADDRESS
mkdir -m 700 "$WMII_NS_DIR" 2>/dev/null
mkdir $HOME/.wmii-3.5 2>/dev/null && CONFPREFIX/wmii-3.5/welcome &
mkdir $HOME/.wmii-CONFVERSION 2>/dev/null && CONFPREFIX/wmii-CONFVERSION/welcome &
exec wmiiwm -a $WMII_ADDRESS -r `PATH="$WMII_CONFPATH:$PATH" which wmiirc`