Ich versuche, eine Windows-freundliche .bat
Implementierung des folgenden .sh
Skript zu erstellen. Die oberen paar Zeilen sind alle in Ordnung, fügen Sie einfach SET
und CD ist in Ordnung. git grep ist in Ordnung, aber xargs
ist nicht ... Was würde die git grep | xargs
Logik in .bat
aussehen?git grep und xargs in Windows Batch-Datei?
INFINITY=10000
TOPDIR=$(pwd)
METEOR_DIR="./code"
cd "$METEOR_DIR"
# Call git grep to find all js files with the appropriate comment tags,
# and only then pass it to JSDoc which will parse the JS files.
# This is a whole lot faster than calling JSDoc recursively.
git grep -al "@summary" | xargs -L ${INFINITY} -t \
"$TOPDIR/node_modules/.bin/jsdoc" \
-t "$TOPDIR/jsdoc/docdata-jsdoc-template" \
-c "$TOPDIR/jsdoc/jsdoc-conf.json" \
2>&1 | grep -v 'WARNING: JSDoc does not currently handle'
mentiert xargs Port auf einigen externen Bibliotheken abhängen, versuchen nativen xargs Port verwenden http://www.pirosa.co.uk/demo/wxargs/wxargs.html statt – user2956477
@ user2956477 warum? Alle externen Bibliotheken sind Pakete mit Git für Windows. – VonC
Es ist immer besser, single native binary ohne Abhängigkeit zu haben, minimiert es mögliche Probleme – user2956477