start-tmux: check if session is interactive
All checks were successful
lint, build and push / lint (push) Successful in 5s
lint, build and push / build (push) Successful in 2m43s

This commit is contained in:
Michael Grote 2024-09-13 18:24:48 +02:00
parent b053416615
commit 869f4c26fc

View file

@ -1,3 +1,6 @@
#!/bin/bash #!/bin/bash
tmux new-session -s ansible-devspace -d ## check interactive shell https://unix.stackexchange.com/questions/26676/how-to-check-if-a-shell-is-login-interactive-batch
tmux attach -t ansible-devspace if [[ $- == *i* ]] ; then
tmux new-session -s ansible-devspace -d
tmux attach -t ansible-devspace
fi