This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -x | |
set -e | |
usage() { | |
echo "Usage: $0 <output name> <git repo path>" | |
exit 1 | |
} | |
[[ $# -eq 2 ]] || { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static String inputStreamToString(final InputStream is) throws IOException { | |
final InputStreamReader ir = new InputStreamReader(is, "UTF-8"); | |
final StringBuilder sb = new StringBuilder(); | |
final char[] buf = new char[1024]; | |
int n; | |
while ((n = ir.read(buf)) != -1) { | |
sb.append(buf, 0, n); | |
} | |
return sb.toString(); | |
} |
NewerOlder