session.sh: backup rather than clearing existing session file
authorbobpaul <bobpaul@lappy486.(none)>
Thu, 4 Jun 2009 01:33:55 +0000 (20:33 -0500)
committerbobpaul <bobpaul@lappy486.(none)>
Thu, 4 Jun 2009 01:33:55 +0000 (20:33 -0500)
examples/scripts/session.sh

index 6d2a64d..e2642c7 100755 (executable)
@@ -44,7 +44,7 @@ case $act in
     ;;
 
   "endsession" )
-    echo -n "" > "$sessionfile"
+    mv "$sessionfile" "$sessionfile~"
     for fifo in $fifodir/uzbl_fifo_*; do
       if [ "$fifo" != "$thisfifo" ]; then
         echo "spawn $scriptfile endinstance" > "$fifo"