/
setup.sh
executable file
·41 lines (32 loc) · 1.09 KB
/
setup.sh
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
33
34
35
36
37
38
39
40
41
#!/bin/source
# shellcheck shell=sh
###################################################################
#Script Name : setup local development environment
#Description :
#Args : None
#Author : socraticDev
#Email : socraticdev@gmail.com
# IMPORTANT: run with 'source' command (ex.: source ./setup.sh)
# in order to set environment variables
###################################################################
cd src || exit
echo "Install app dependency on local machine"
go install
echo "Build app into an executable binary"
go build .
if [ "${GOPATH}" ]; then
echo "GOPATH is set to ${GOPATH}: that's good!"
else
echo ""
echo "(warning) GOPATH variable is unset! Please learn how to set your GOPATH and do it!"
echo ""
fi
echo "Export configuration file (conf.json) file to environment variable"
curr_dir=$(pwd)
export MASTODONCTL_CONFIG_FILEPATH="${curr_dir}"/conf.json
echo "Your config file is located at:"
echo "${MASTODONCTL_CONFIG_FILEPATH}"
echo ""
echo "Now you can run mastodonctl simply by issuing this command:"
echo ""
echo "mastodonctl"