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
Labels
Merge Requests
2
Merge Requests
2
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
apachedex
Commits
054a836a
Commit
054a836a
authored
Aug 10, 2013
by
Vincent Pelletier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
parallel_parse: Check argument count before accessing arguments.
parent
cd70bb49
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
parallel_parse.sh
parallel_parse.sh
+6
-6
No files found.
parallel_parse.sh
View file @
054a836a
...
@@ -12,7 +12,12 @@ usage() {
...
@@ -12,7 +12,12 @@ usage() {
echo
" bin/apachedex --period week"
echo
" bin/apachedex --period week"
}
}
if
[
$1
=
'-h'
-o
$1
=
'--help'
]
;
then
if
[
$#
-lt
4
]
;
then
usage
exit
1
fi
if
[
"
$1
"
=
"-h"
-o
"
$1
"
=
"--help"
]
;
then
usage
usage
exit
0
exit
0
fi
fi
...
@@ -25,11 +30,6 @@ shift
...
@@ -25,11 +30,6 @@ shift
OUT_FILE
=
$1
OUT_FILE
=
$1
shift
shift
if
[
$#
-eq
0
]
;
then
usage
exit
1
fi
# XXX: any simpler way ?
# 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
echo
...
...
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