Artifact 44cdd9be1ab0941346d7a85281d7986193dbbc4e:
- Executable file utils/viewscreen — part of check-in [1271e7d48f] at 2016-10-15 14:45:12 on branch v1.62 — Added -manual command to view installed manual or fallback to web version (user: matt, size: 500) [annotate] [blame] [check-ins using]
#!/bin/bash
if ! type screen &> /dev/null;then
xterm -geometry 180x20 -e "$*;echo Press any key to continue;bash -c 'read -n 1 -s'" &
exit
fi
if [[ $(screen -list | egrep 'Attached|Detached'|awk '{print $1}') == "" ]];then
# echo "No screen found for displaying to. Run \"screen\" in an xterm"
# exit 1
xterm -e screen &
sleep 1
fi
cmd="cd $PWD;$*"
screen -X screen bash -c "$cmd;echo \"Press any key to continue, ctrl-a <space> to see other windows\";bash -c 'read -n 1 -s'"