More robust, self contained, no longer needing an external file, can be

run from anywhere, and cleans up after itself.


SVN revision: 26343
This commit is contained in:
David Walter Seikel 2006-10-04 11:31:46 +00:00
parent cc0bc870a3
commit 00cb0f56dd
2 changed files with 7 additions and 4 deletions

View File

@ -1,2 +0,0 @@
run
bt

View File

@ -5,10 +5,12 @@
main=$DISPLAY main=$DISPLAY
display=" -display :1" display=" -display :1"
tmp='mktemp' || exit 1
echo -e "run\nbt\nq\ny" > $tmp
case "$@" in case "$@" in
"") action="gdb -x gdb.txt" ; main=":1" ; display="" ;; "") action="gdb -x $tmp" ; main=":1" ; display="" ;;
"-b") action="gdb -x gdb.txt" ; main=":1" ; display="" ;; "-b") action="gdb -x $tmp" ; main=":1" ; display="" ;;
"-d") action="ddd -display $main" ; display="" ;; "-d") action="ddd -display $main" ; display="" ;;
"-e") action="" ;; "-e") action="" ;;
"-g") action="gdb" ; main=":1" ; display="" ;; "-g") action="gdb" ; main=":1" ; display="" ;;
@ -42,3 +44,6 @@ Xnest :1 -ac &
sleep 2 # Someone reported that it starts E before X has started properly. sleep 2 # Someone reported that it starts E before X has started properly.
DISPLAY=$main; $action enlightenment $display DISPLAY=$main; $action enlightenment $display
rm -f $tmp
killall -TERM Xnest