update_autogen: Improve error handling slightly
* admin/update_autogen: Check exit status of cd. Use single quoting for trap condition.
This commit is contained in:
parent
db56f2c264
commit
a8bfdf2efc
1 changed files with 2 additions and 2 deletions
|
@ -44,7 +44,7 @@ PD=${0%/*}
|
|||
[ "$PD" = "$0" ] && PD=. # if PATH includes PWD
|
||||
|
||||
## This should be the admin directory.
|
||||
cd $PD
|
||||
cd $PD || exit
|
||||
cd ../
|
||||
[ -d admin ] || die "Could not locate admin directory"
|
||||
|
||||
|
@ -102,7 +102,7 @@ done
|
|||
|
||||
tempfile=/tmp/$PN.$$
|
||||
|
||||
trap "rm -f $tempfile 2> /dev/null" EXIT
|
||||
trap 'rm -f $tempfile 2> /dev/null' EXIT
|
||||
|
||||
|
||||
while getopts ":hcfqA:CL" option ; do
|
||||
|
|
Loading…
Add table
Reference in a new issue