PMova-se: including clear alias and a screen version of script

This commit is contained in:
Bruno F. Fontes 2020-05-24 11:11:38 -03:00
parent 32671c4624
commit d651d56726
Signed by: brunofontes
GPG Key ID: EE3447CE80048495
2 changed files with 26 additions and 2 deletions

24
startPMovase.sh Executable file
View File

@ -0,0 +1,24 @@
cd /run/media/bruno/Multimedia/MyDocuments/Development/projetomovase
if [[ $(screen -ls | grep 'pmovase') ]]; then
echo "Já está rodando, saindo..."
exit
fi
echo "Iniciando Vagrant..."
screen -dmS pmovase
screen -S pmovase -p 0 -X stuff $'npm run vagrant; npm run watch\n'
screen -S pmovase -X screen
screen -S pmovase -X screen
sleep 2s
screen -S pmovase -p 2 -X title $'GIT'
sleep 2m
screen -S pmovase -p 0 -X title $'NPM WATCH\n'
screen -S pmovase -p 1 -X stuff $'npm run ssh\n'
sleep 5s
screen -S pmovase -p 1 -X title $'Artisan'
screen -S pmovase -X select 2
screen -S pmovase -p 1 -X echo $'Done!\n'
screen -S pmovase -p 2 -X echo $'Done!\n'
echo "Screen running. Attach to it with 'screen -r pmovase'"

View File

@ -29,6 +29,6 @@ done
tmux send -t pmovase:0.1 $'npm run test-watch\n'
tmux send -t pmovase:0.2 $'^u'
tmux send -t pmovase:0.2 $'phpunit-watcher watch\n'
tmux send -t pmovase:0.3 $'ssh homestead -t \"cd code;clear; figlet Vagrant;bash --login\"\n'
tmux send -t pmovase:0.4 $'clear;figlet PMova-se\n'
tmux send -t pmovase:0.3 $'ssh homestead -t \"cd code;alias clear='clear; figlet Vagrant';clear;bash --login\"\n'
tmux send -t pmovase:0.4 $'alias clear='clear;figlet PMova-se';clear\n'