Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(978)

Side by Side Diff: tools/fiddle/parse-fiddle-output

Issue 1895143002: experimental/fiddle -> tools/fiddle (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « tools/fiddle/fiddler.go ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/bin/sh 1 #!/bin/sh
2 # Copyright 2015 Google Inc. 2 # Copyright 2015 Google Inc.
3 # 3 #
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 # Parse the output of fiddle_main, for use in testing 7 # Parse the output of fiddle_main, for use in testing
8 while IFS= read -r line; do 8 while IFS= read -r line; do
9 type=$(echo $line | sed -n 's/[^"]*"\([^"]*\)":.*/\1/p') 9 type=$(echo $line | sed -n 's/[^"]*"\([^"]*\)":.*/\1/p')
10 if [ "$type" ]; then 10 if [ "$type" ]; then
11 case "$type" in 11 case "$type" in
12 Raster|Gpu) ext='.png';; 12 Raster|Gpu) ext='.png';;
13 Pdf) ext='.pdf';; 13 Pdf) ext='.pdf';;
14 Skp) ext='.skp';; 14 Skp) ext='.skp';;
15 esac 15 esac
16 dst="${TMPDIR:-/tmp}/fiddle_${type}${ext}" 16 dst="${TMPDIR:-/tmp}/fiddle_${type}${ext}"
17 echo $line | sed 's/[^"]*"[^"]*": "//; s/"\(,\|\)$//' \ 17 echo $line | sed 's/[^"]*"[^"]*": "//; s/"\(,\|\)$//' \
18 | base64 -d > "$dst" 18 | base64 -d > "$dst"
19 echo $dst 19 echo $dst
20 fi 20 fi
21 done 21 done
OLDNEW
« no previous file with comments | « tools/fiddle/fiddler.go ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698