handle urgent and not urgent tag events
[wmiirc-lua.git] / install-wmiirc-lua
blob88500ee8e4c96875e9c1968d167b45e7c5d21442
1 #!/bin/sh
2 # Copyright (c) 2007, Bart Trojanowski <bart@jukie.net>
4 # This script installs wmiirc-lua files into $HOME/.wmii-3.5
6 set -e
8 SRC_DIR="/etc/X11/wmii-3.5"
9 DST_DIR="${HOME}/.wmii-3.5"
11 SRC_WMIIRC="${SRC_DIR}/wmiirc.lua"
12 DST_WMIIRC="${DST_DIR}/wmiirc"
14 do_install () {
15 INSTALL="install $@"
17 ${INSTALL} -m 755 -d "${DST_DIR}"
18 ${INSTALL} -m 744 -T "${SRC_WMIIRC}" "${DST_WMIIRC}"
21 while test -n "$1" ; do
22 cmd=$1 ; shift
23 case $cmd in
24 --force)
25 do_install
27 --backup)
28 do_install -b
31 break
33 esac
34 done
36 if ! test -f "${SRC_WMIIRC}" ; then
37 echo >&2 "System wide files for wmiirc-lua not installed."
38 exit 1
41 if test -f "${DST_WMIIRC}" ; then
42 echo >&2 "You already have files installed in ${DST_WMIIRC}."
43 echo >&2 ""
44 echo >&2 "Please select one of the following options and rerun this script:"
45 echo >&2 ""
46 echo >&2 " $0 --force - overwrite existing files"
47 echo >&2 " $0 --backup - backup existing files"
48 exit 1
51 do_install