POSTIN
/bin/sh
if [ -x /usr/bin/rebuild-gcj-db ]; then /usr/bin/rebuild-gcj-db || true ; fi
if [ -f /usr/lib64/eclipse/configuration/config.ini ]; then
sed --in-place "s/[#]*eclipse.product=.*/eclipse.product=org.eclipse.sdk.ide/" \
/usr/lib64/eclipse/configuration/config.ini
fi
POSTUN
/bin/sh
if [ -x /usr/bin/rebuild-gcj-db ]; then /usr/bin/rebuild-gcj-db || true ; fi
# Only set the product back to platform.ide if the sdk is actually removed for
# this arch. This SDKDIR check is to deal with the ordering of new %post
# before old %postun
if [ -d /usr/lib64/eclipse/features ]; then
SDKDIR=$(ls /usr/lib64/eclipse/features | grep "org\.eclipse\.sdk_")
else
SDKDIR=""
fi
if [ -z "$SDKDIR" -a -f /usr/lib64/eclipse/configuration/config.ini ]; then
sed --in-place "s/[#]*eclipse.product=.*/eclipse.product=org.eclipse.platform.ide/" \
/usr/lib64/eclipse/configuration/config.ini
fi