From 3e67b6089eddc33b4ca964cfc06131eb20421add Mon Sep 17 00:00:00 2001 From: Martin Stjernholm <mast@lysator.liu.se> Date: Wed, 30 Aug 2000 01:14:26 +0200 Subject: [PATCH] Backup and restore .gdbinit if there already is one. Rev: bin/pike.in:1.6 --- bin/pike.in | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bin/pike.in b/bin/pike.in index dd7a43055d..2483c935f1 100644 --- a/bin/pike.in +++ b/bin/pike.in @@ -21,9 +21,14 @@ if test x"$1" = x--gdb; then arg=`echo $arg | sed -e s/\'/\'\"\'\"\'/g` args="$args '$arg'" done - echo $args > .gdbinit + if test -f .gdbinit; then + mv .gdbinit .gdbinit.orig + cp .gdbinit.orig .gdbinit + fi + echo $args >> .gdbinit gdb "$BUILDDIR/pike" rm .gdbinit + test -f .gdbinit.orig && mv .gdbinit.orig .gdbinit else exec "$BUILDDIR/pike" "-m$BUILDDIR/master.pike" "$@" fi -- GitLab