summaryrefslogtreecommitdiff
path: root/admin/update_autogen
diff options
context:
space:
mode:
Diffstat (limited to 'admin/update_autogen')
-rwxr-xr-xadmin/update_autogen20
1 files changed, 2 insertions, 18 deletions
diff --git a/admin/update_autogen b/admin/update_autogen
index d1f49d9f25e..55e11be95c7 100755
--- a/admin/update_autogen
+++ b/admin/update_autogen
@@ -32,18 +32,7 @@
### Code:
-set -o nounset
-
-die () # write error to stderr and exit
-{
- [ $# -gt 0 ] && echo "$PN: $@" >&2
- exit 1
-}
-
-PN=${0##*/} # basename of script
-PD=${0%/*}
-
-[ "$PD" = "$0" ] && PD=. # if PATH includes PWD
+source "${0%/*}/emacs-shell-lib"
## This should be the admin directory.
cd $PD || exit
@@ -102,10 +91,7 @@ done
[ "$basegen" ] || die "internal error"
-tempfile=/tmp/$PN.$$
-
-trap 'rm -f $tempfile 2> /dev/null' EXIT
-
+tempfile="$(emacs_mktemp)"
while getopts ":hcfqA:CL" option ; do
case $option in
@@ -312,5 +298,3 @@ commit "loaddefs" $modified || die "commit error"
exit 0
-
-### update_autogen ends here