pot/std/shell/screen.yml
Lunny Xiao 60374a08ca
All checks were successful
continuous-integration/drone/push Build is passing
Support std library, remote library from github and gitea
2020-11-28 14:35:32 +08:00

15 lines
381 B
YAML

version: 1
name: Close the old program on a screen and execute the command
tasks:
- name: screen
args:
- dir
- name
- cmd
steps:
- screen -list | grep -q {{.name}} && screen -X -S {{.name}} quit || echo ''
- screen -dmS {{.name}}
- screen -x -S {{.name}} -p 0 -X stuff "cd {{.dir}} && {{.cmd}}"
- screen -x -S {{.name}} -p 0 -X stuff '\n'