]> git.friedersdorff.com Git - max/saltfiles.git/blob - bootstrap.sh
Add black integration to vim
[max/saltfiles.git] / bootstrap.sh
1 #!/bin/sh
2
3 SALT_CMD="salt-call"
4
5 install_salt() {
6         booststrap=${mktemp}
7         curl -L https://bootstrap.saltstack.com -o "${bootstrap}"
8         sudo sh "${bootstrap}" -P
9 }
10
11 which $SALT_CMD > /dev/null || install_salt
12
13 if [ ! $1 ]; then
14         sudo $SALT_CMD \
15                 --local \
16                 --config=./ \
17                 --state_verbose=True \
18                 --state-output=mixed \
19                 --log-level=quiet \
20                 --retcode-passthrough state.highstate
21 else
22         sudo $SALT_CMD \
23                 --local \
24                 --config=./ \
25                 --state_verbose=True \
26                 --state-output=mixed \
27                 --log-level=quiet \
28                 --retcode-passthrough state.sls $1
29 fi