diff options
| author | Stefan Kangas | 2021-12-02 18:30:16 +0100 |
|---|---|---|
| committer | Stefan Kangas | 2021-12-02 18:32:54 +0100 |
| commit | a8bfdf2efc41479efecee4dff71fe8a341cb5729 (patch) | |
| tree | 9285f5b3edd342febaa2e64b3f29dd14aa3cd3e0 /admin/update_autogen | |
| parent | db56f2c264fe7cd7ec2bd3ed7bc96a7473b4983b (diff) | |
| download | emacs-a8bfdf2efc41479efecee4dff71fe8a341cb5729.tar.gz emacs-a8bfdf2efc41479efecee4dff71fe8a341cb5729.zip | |
update_autogen: Improve error handling slightly
* admin/update_autogen: Check exit status of cd. Use single
quoting for trap condition.
Diffstat (limited to 'admin/update_autogen')
| -rwxr-xr-x | admin/update_autogen | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/admin/update_autogen b/admin/update_autogen index 2b6a46051cb..99297a9c0dc 100755 --- a/admin/update_autogen +++ b/admin/update_autogen | |||
| @@ -44,7 +44,7 @@ PD=${0%/*} | |||
| 44 | [ "$PD" = "$0" ] && PD=. # if PATH includes PWD | 44 | [ "$PD" = "$0" ] && PD=. # if PATH includes PWD |
| 45 | 45 | ||
| 46 | ## This should be the admin directory. | 46 | ## This should be the admin directory. |
| 47 | cd $PD | 47 | cd $PD || exit |
| 48 | cd ../ | 48 | cd ../ |
| 49 | [ -d admin ] || die "Could not locate admin directory" | 49 | [ -d admin ] || die "Could not locate admin directory" |
| 50 | 50 | ||
| @@ -102,7 +102,7 @@ done | |||
| 102 | 102 | ||
| 103 | tempfile=/tmp/$PN.$$ | 103 | tempfile=/tmp/$PN.$$ |
| 104 | 104 | ||
| 105 | trap "rm -f $tempfile 2> /dev/null" EXIT | 105 | trap 'rm -f $tempfile 2> /dev/null' EXIT |
| 106 | 106 | ||
| 107 | 107 | ||
| 108 | while getopts ":hcfqA:CL" option ; do | 108 | while getopts ":hcfqA:CL" option ; do |