#!/bin/sh
#
# install_fvwm2 - install treeps to for fvwm2
#
# Assume the CWD is in the desktop dir and userid of root.

CONFIG_DIR=/etc/X11/wmconfig
ICON_SHARE=/usr/share/icons

if [ ! -d "$CONFIG_DIR" ]
then
  echo "Warning: Can't find wmconfig - checked in $CONFIG_DIR"
  echo "You can install for fvwm2 at a later time by running install_fvwm2"
  echo "from the /usr/X11R6/lib/X11/treeps/desktop directory"
  exit 0
fi

if  [ ! -d "$ICON_SHARE" ]
then
	echo "Can't find icon share dir - checked in $ICON_SHARE"
	exit 0
fi

ICON_ROOT=../icons

FVWM2_INSTALL_ROOT=fvwm2

install -m 644 $FVWM2_INSTALL_ROOT/wmconfig/treeps   $CONFIG_DIR/treeps

install -m 644 $ICON_ROOT/loColor/16/mini-treeps.xpm $ICON_SHARE/mini
install -m 644 $ICON_ROOT/loColor/48/programIcon.xpm $ICON_SHARE/treeps.xpm

