chezmoi/bin/executable_lunardev.sh
kjuulh 31d7ef27a8
Add bin/devhamctl
Add bin/docker-traverse.sh
Add bin/exec-sanity.sh
Add bin/lunardev.sh
Add bin/record.sh
Add bin/restart-builds-drone.sh
Add bin/run-dosier.sh
Add bin/sanity.sh
Add bin/scan-for-bad-indexes.sh
Add bin/ssh-agent.sh
Add bin/terraform.sh
Add bin/tmux.sh
Add bin/update-vault.sh
Add bin/zimfwupdate.sh
2023-07-24 12:42:39 +02:00

34 lines
719 B
Bash

#!/usr/bin/env zsh
function lunardev ()
{
nolunardev
tmux new-window -n lunardev
tmux send-keys -t lunardev "shuttle run local_up" C-m
# allow for user input
tmux split-window -h
shuttle run generate_dotenv
tmux send-keys -t lunardev 'export $(cat local.env | xargs)' C-m
tmux send-keys -t lunardev "air -c ~/.config/air/.air.toml" C-m
tmux split-window -v
export $(cat local.env | xargs)
tmux send-keys -t lunardev "PGPASSWORD=$DBPASSWORD psql -h $DBHOST -U $DBUSER -d $DBDATABASE" C-m
# set user input to first
tmux select-pane -t 0
tmux attach-session -t lunardev
}
function nolunardev() {
tmux kill-window -t lunardev || true
}