File: fftrace

package info (click to toggle)
edbrowse 3.8.12-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,992 kB
  • sloc: ansic: 48,603; javascript: 16,211; perl: 6,825; sh: 120; makefile: 81; cpp: 56
file content (14 lines) | stat: -rwxr-xr-x 585 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#  Change our traced js file into something palatable by a standard browser.
#  With the -t option, convert each trace into an alert.
#  Without it, the traces just go away.
# Get rid of the stuff after catch(e).
#  Don't leave bp@(stuff) hanging around, that will pass through and blow up.
#  Process input to output; no arguments.

if [ $# = 1 -a "$1" = "-t" ]; then
sed -e 's/trace@(\([a-zA-Z][0-9]*\))/alert("\1");/g' \
-e 's/\(}catch([a-zA-Z_0-9]*){\)if(db.*step\$l=2;/\1/'
else
sed -e 's/trace@(\([a-zA-Z][0-9]*\))//g' \
-e 's/\(}catch([a-zA-Z_0-9]*){\)if(db.*step\$l=2;/\1/'
fi