-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathgolem
executable file
·32 lines (27 loc) · 838 Bytes
/
golem
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/bash
# Default nwjs installation
# Use golem -nw /Some/Other/Path/To/nwjs
# for a different location
NWJS="/Applications/Golem.app/Contents/MacOS/nwjs"
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
REST=()
while [[ $# > 0 ]]; do
key="$1"
case $key in
-nw|--node-webkit)
NWJS="$2"
shift # past argument
;;
*)
REST+=("$1") # unknown option
;;
esac
shift
done
script -q /dev/null "$NWJS" "$DIR" "$REST" --enable-logging=stderr | perl -p -e 's/^\[.+?\] //;
s/source: chrome-extension:\/\/\w+\/dist\/([^\s\?]+)(\?b=\d+)? \((\d+)\)/\033[32;m\1:\3\033[0;m/;
s/\(chrome-extension:\/\/\w+\/dist\/([^\)]+)\)/\033[32;m\1\033[0;m/g;
s/\\n/\n\r/g;
s/""(([^"]|"(?!"))+?)""/"\1"/;
s/("([^"]|\\\\")*")/\033[33;m\1\033[0;m/g;
s/js\/vendor\/ace\/ace.js:16252/from Ace worker/g'