Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
apachedex
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Vincent Pelletier
apachedex
Commits
0cb4f905
Commit
0cb4f905
authored
Aug 10, 2013
by
Vincent Pelletier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
parallel_parse: More quoting.
parent
054a836a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
parallel_parse.sh
parallel_parse.sh
+4
-4
No files found.
parallel_parse.sh
View file @
0cb4f905
...
...
@@ -22,16 +22,16 @@ if [ "$1" = "-h" -o "$1" = "--help" ]; then
exit
0
fi
PARALLELISM
=
$1
PARALLELISM
=
"
$1
"
shift
STATE_DIR
=
$1
STATE_DIR
=
"
$1
"
mkdir
-p
"
$STATE_DIR
"
||
exit
$?
shift
OUT_FILE
=
$1
OUT_FILE
=
"
$1
"
shift
# XXX: any simpler way ?
xargs
-0
-r
-n
1
-P
$PARALLELISM
-I
"@FILE@"
--
"
$SHELL
"
-c
'INFILE="$1";shift;STATE_DIR="$1";shift;echo -n .;"$@" -Q --format json --out "$STATE_DIR/$(sed s:/:@:g <<< "$INFILE").json" "$INFILE"'
"
$0
"
"@FILE@"
"
$STATE_DIR
"
"
$@
"
xargs
-0
-r
-n
1
-P
"
$PARALLELISM
"
-I
"@FILE@"
--
"
$SHELL
"
-c
'INFILE="$1";shift;STATE_DIR="$1";shift;echo -n .;"$@" -Q --format json --out "$STATE_DIR/$(sed s:/:@:g <<< "$INFILE").json" "$INFILE"'
"
$0
"
"@FILE@"
"
$STATE_DIR
"
"
$@
"
echo
# XXX: what if there are too many state files for a single execution ?
find
"
$STATE_DIR
"
-type
f
-print0
| xargs
-0
-r
"
$@
"
--out
"
$OUT_FILE
"
--state-file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment