#!/bin/sh -e

[ "$PS_COLORS" = "" -a "$TOP_COLORS" = "" ] && exit

[ "`md5sum /etc/pscolor|cut -d ' ' -f 1`" != \
 "abd6b8fe7eb00394fa6ff04ebcdaec1f" ] && exit

echo "PS_COLORS and/or TOP_COLORS set.  Do you want to make a new /etc/pscolor"
echo -n "file using these variables? [Yn] "
read X
X=`echo $X|tr A-Z a-z`
while [ "$X" != "y" -a "$X" != "n" -a "$X" != "" ];do
 echo -n "Yes or no please: [Yn] "
 read X
 X=`echo $X|tr A-Z a-z`
done
[ "$X" = "n" ] && exit
echo pscol -c -f /etc/pscolor
