File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,14 +11,15 @@ source $TOP_DIR/functions
1111
1212source $TOP_DIR /stackrc
1313
14+ SCREENRC=$TOP_DIR /$SCREEN_NAME -screenrc
1415# if screenrc exists, run screen
15- if [[ -e $TOP_DIR /stack-screenrc ]]; then
16- if screen -ls | egrep -q " [0-9].stack " ; then
16+ if [[ -e $SCREENRC ]]; then
17+ if screen -ls | egrep -q " [0-9]+. ${SCREEN_NAME} " ; then
1718 echo " Attaching to already started screen session.."
18- exec screen -r stack
19+ exec screen -r $SCREEN_NAME
1920 fi
20- exec screen -c $TOP_DIR /stack-screenrc
21+ exec screen -c $SCREENRC
2122fi
2223
23- echo " Couldn't find $TOP_DIR /stack-screenrc file; have you run stack.sh yet?"
24+ echo " Couldn't find $SCREENRC file; have you run stack.sh yet?"
2425exit 1
Original file line number Diff line number Diff line change 182182# Clean up the remainder of the screen processes
183183SCREEN=$( which screen)
184184if [[ -n " $SCREEN " ]]; then
185- SESSION=$( screen -ls | awk ' /[0-9].stack/ { print $1 }' )
185+ SESSION=$( screen -ls | awk " /[0-9]+. ${SCREEN_NAME} / " ' { print $1 }' )
186186 if [[ -n " $SESSION " ]]; then
187187 screen -X -S $SESSION quit
188188 fi
You can’t perform that action at this time.
0 commit comments