blob: 04b411f984b88a794c32f9d464f5d88573e56ad3 (
plain)
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
|
#!/bin/sh
function program_exists () {
local program="$1"
command -v "$program" > /dev/null
}
function install_if_not_found () {
local program="$1"
if ! program_exists "$1"; then
brew install "$program"
fi
}
if [ "$1" = "--install" ]; then
if ! program_exists hasp; then
mkdir /usr/local/Cellar/hasp
git clone https://github.com/djanowski/hasp.git /usr/local/Cellar/hasp/HEAD
brew link hasp
fi
install_if_not_found golang-migrate
if ! program_exists mysql; then
brew install mariadb
fi
fi
if [ ! -f .env ]; then
cp .env.sample .env
fi
vim .env
source .env
migrate-up
|