* Matt Zimmerman | On Sat, Dec 29, 2001 at 04:01:40PM +0100, Tollef Fog Heen wrote: | | > * Gaetano Paolone | > | #DEBHELPER# | > | ****************** end postinst ******************* | > | | > | ****************** begin makedb.sh ******************* | > | #!/bin/bash | > | #set -e | > | export SHAREDIR=/usr/share/odontolinux | > | export TMPDIR=/var/tmp/odontolinux | > | export PATH=$PATH:/usr/lib/postgresql/bin | > | | > | mkdir -p $TMPDIR | > | > mkdir -p $TMPDIR || exit 1, I presume? | | Or, uncomment "set -e" and guard whichever commands (presumably few) should | be allowed to fail.
Actually, neither your nor my suggestion will work. mkdir -p doesn't fail if the directory already exists, so you probably want something like mkdir $TMPDIR || exit 1 (or mkdir $TMPDIR with set -e active). And it should respect TMPDIR if it is already set, and I see no reason why it uses /var/tmp instead of /tmp. :) -- Tollef Fog Heen Unix _IS_ user friendly... It's just selective about who its friends are.