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

CONFIG_DIR=`getWMConfigPath`
ICON_SHARE=`getIconSharePath`

if [ ! -d "$CONFIG_DIR" ]
then
  echo ""
  echo "NOTE: Can't find fvwm2 config dir - checked in $CONFIG_DIR"
  echo "You can install for the fvwm2 dekstop at a later time by running "
  echo "./Setup -d from the /usr/X11R6/lib/X11/treeps 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=desktop/fvwm2

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

F=mini-treeps.xpm

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

