Skip to content
Snippets Groups Projects
Commit 3e67b608 authored by Martin Stjernholm's avatar Martin Stjernholm
Browse files

Backup and restore .gdbinit if there already is one.

Rev: bin/pike.in:1.6
parent 6b435334
No related branches found
No related tags found
No related merge requests found
...@@ -21,9 +21,14 @@ if test x"$1" = x--gdb; then ...@@ -21,9 +21,14 @@ if test x"$1" = x--gdb; then
arg=`echo $arg | sed -e s/\'/\'\"\'\"\'/g` arg=`echo $arg | sed -e s/\'/\'\"\'\"\'/g`
args="$args '$arg'" args="$args '$arg'"
done done
echo $args > .gdbinit if test -f .gdbinit; then
mv .gdbinit .gdbinit.orig
cp .gdbinit.orig .gdbinit
fi
echo $args >> .gdbinit
gdb "$BUILDDIR/pike" gdb "$BUILDDIR/pike"
rm .gdbinit rm .gdbinit
test -f .gdbinit.orig && mv .gdbinit.orig .gdbinit
else else
exec "$BUILDDIR/pike" "-m$BUILDDIR/master.pike" "$@" exec "$BUILDDIR/pike" "-m$BUILDDIR/master.pike" "$@"
fi fi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment