#!/bin/sh
#
# Preinstall Script for Cenon
# by Georg Fleischmann
#
# created:  2010-09-25
# modified: 2010-12-14
#

# remove CAM module
[[ -d /Applications/Cenon.app/Contents/Resources/CAM.bundle ]] &&
{
  rm -R /Applications/Cenon.app/Contents/Resources/CAM.bundle;
}

# remove old Cenon Examples
[[ -d /Library/Cenon/Examples/ai   ]] && { rm -R /Library/Cenon/Examples/ai;   }
[[ -d /Library/Cenon/Examples/dxf  ]] && { rm -R /Library/Cenon/Examples/dxf;  }
[[ -d /Library/Cenon/Examples/hpgl ]] && { rm -R /Library/Cenon/Examples/hpgl; }
[[ -d /Library/Cenon/Examples/pdf  ]] && { rm -R /Library/Cenon/Examples/pdf;  }
[[ -d /Library/Cenon/Examples/ps   ]] && { rm -R /Library/Cenon/Examples/ps;   }

# remove old receipts of Cenon
if [ -d /Library/Receipts/Cenon-3.8[0123].pkg ] ; then
  rm -R /Library/Receipts/Cenon-3.8[0123].pkg
fi
