elmer.postinst 644 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
#! /bin/sh -e 

PROVIDED_MODELS="helmholtz navier-stokes resultoutput heatequation linearelasticity k-epsilon meshdeform elasticplate electrostatics freesurface poissonboltzmann reynolds saveline savescalars statcurrent"

# Load debconf
. /usr/share/debconf/confmodule

# Get selected models into \n-separated list
db_get elmer/models
SELECTED_MODELS="$(echo $RET | sed -e 's/, / /g')"

# Remove old symlinks, if any
for model in $PROVIDED_MODELS; do
    rm -f /usr/share/ElmerGUI/edf/$model.xml;
done

# Make new symlinks
for model in $SELECTED_MODELS; do
    ln -s ../edf-extra/$model.xml /usr/share/ElmerGUI/edf/$model.xml
done

#DEBHELPER#