diff options
Diffstat (limited to 'graphics/graphviz/doinst.sh')
-rw-r--r-- | graphics/graphviz/doinst.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/graphics/graphviz/doinst.sh b/graphics/graphviz/doinst.sh index 24af708a0e..3eeed5b0f0 100644 --- a/graphics/graphviz/doinst.sh +++ b/graphics/graphviz/doinst.sh @@ -1,3 +1,18 @@ +config() { + NEW="$1" + OLD="$(dirname $NEW)/$(basename $NEW .new)" + # If there's no config file by that name, mv it over: + if [ ! -r $OLD ]; then + mv $NEW $OLD + elif [ "$(cat $OLD|md5sum)" = "$(cat $NEW|md5sum)" ]; then + # toss the redundant copy + rm $NEW + fi + # Otherwise, we leave the .new copy for the admin to consider... +} + +config etc/php/graphviz.ini.new + # Configure plugins # (writes /usr/lib*/graphviz/config6 with available plugin information) chroot . /usr/bin/dot -c |