Skip to content

Commit d4e8285

Browse files
committed
update conv.sh
1 parent 4e40622 commit d4e8285

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

cli/archivist/example/conv.sh

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,17 @@ function printUsage() {
3535
go run ../archivist.go orphan json conf go
3636
[[ $? -ne 0 ]] && exit 1
3737

38-
go run ../archivist.go generate --outputDir=conf --pkg=conf --x-easyjson "$@" json/*.json json/*.js
38+
if ! [[ `which easyjson` ]]; then
39+
go get -u github.com/edwingeng/easyjson-alt/easyjson
40+
[[ $? -ne 0 ]] && exit 1
41+
fi
42+
43+
if [[ `which node` ]]; then
44+
go run ../archivist.go generate --outputDir=conf --pkg=conf --x-easyjson "$@" 'json/*.json' 'json/*.js'
45+
[[ $? -ne 0 ]] && exit 1
46+
else
47+
go run ../archivist.go generate --outputDir=conf --pkg=conf --x-easyjson "$@" 'json/*.json'
48+
[[ $? -ne 0 ]] && exit 1
49+
fi
50+
51+
:

lib/go/overwrite/conv.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ function printUsage() {
3232
$colorful && tput setaf 7
3333
}
3434

35+
if ! [[ `which easyjson` ]]; then
36+
go get -u github.com/edwingeng/easyjson-alt/easyjson
37+
[[ $? -ne 0 ]] && exit 1
38+
fi
39+
3540
WATCHER_CONF_GROUP=develop WATCHER_CONF_SUBGROUP=dolores ../../../cli/script/js2json.sh "`pwd`/json"
3641
echo
3742

0 commit comments

Comments
 (0)