dotfiles/salt/states/gbt.sls

19 lines
664 B
Plaintext
Raw Normal View History

2020-05-11 07:55:35 +00:00
# Install GoBulleTrain,
# Highly configurable prompt builder for Bash, ZSH and PowerShell written in Go.
Make sure go directory exists:
file.directory:
- name: {{ salt['user.info']( pillar['user']['username']).home }}/go
- user: {{ pillar['user']['username'] }}
- group: users
- mode: "0755"
{% if not salt['file.directory_exists']('{}/go/src/github.com/jtyr/gbt'.format(salt['user.info']( pillar['user']['username']).home)) %}
Go get GBT:
cmd.run:
- name: go get github.com/jtyr/gbt/cmd/gbt
- runas: {{ pillar['user']['username'] }}
- env:
- GOPATH: {{ salt['user.info']( pillar['user']['username']).home }}/go
{% endif %}