Skip to content

Instantly share code, notes, and snippets.

@zerospiel
Last active January 9, 2019 15:18
Show Gist options
  • Select an option

  • Save zerospiel/8c877629dab9cd538560ae1c0775643f to your computer and use it in GitHub Desktop.

Select an option

Save zerospiel/8c877629dab9cd538560ae1c0775643f to your computer and use it in GitHub Desktop.
Rebuild dadebotsdb
#!/bin/sh
DIR="$GOPATH/src/bitbucket.org/dadebotsdb/"
ADDRESS="address"
APP="app"
FETCHER="fetcher"
IMPORTER="importer"
INDEXER="indexer"
IO="io"
MUNROLL="munroll"
NORMALIZER="normalizer"
PREIMPORT="preimport"
SCRAPER="scraper"
type go > /dev/null 2>&1 || { echo >&2 "Go is not installed. Exiting..."; exit 1; }
cd $DIR
case "$1" in
all)
cd $DIR/$ADDRESS && eval "go build ./server/cmd/address-cli/..." && eval "go build ./server/cmd/address-srv/..."
cd $DIR/$APP && eval "go install ./cmd/app-server/"
cd $DIR/$FETCHER && eval "go build ./cmd/..."
cd $DIR/$IMPORTER && eval "go build ./cmd/..."
cd $DIR/$INDEXER && eval "go build ."
cd $DIR/$IO && eval "go build ."
cd $DIR/$MUNROLL && eval "go build ./cmd/..."
cd $DIR/$NORMALIZER && eval "go build ."
cd $DIR/$PREIMPORT && eval "go build ./cmd/..."
cd $DIR/$SCRAPER && eval "go build ./cmd/..."
;;
address)
cd $DIR/$ADDRESS && eval "go build ./server/cmd/address-cli/..." && eval "go build ./server/cmd/address-srv/..."
;;
app)
cd $DIR/$APP && eval "go install ./cmd/app-server/"
;;
fetcher)
cd $DIR/$FETCHER && eval "go build ./cmd/..."
;;
importer)
cd $DIR/$IMPORTER && eval "go build ./cmd/..."
;;
indexer)
cd $DIR/$INDEXER && eval "go build ."
;;
io)
cd $DIR/$IO && eval "go build ."
;;
munroll)
cd $DIR/$MUNROLL && eval "go build ./cmd/..."
;;
normalizer)
cd $DIR/$NORMALIZER && eval "go build ."
;;
preimport)
cd $DIR/$PREIMPORT && eval "go build ./cmd/..."
;;
scraper)
cd $DIR/$SCRAPER && eval "go build ./cmd/..."
;;
*)
echo $"Usage: $0 {all|address|app|fetcher|importer|io|munroll|normalizer|preimport|scraper}"
exit 1
esac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment