Avoid double multiple runs

parent 59a6589d
......@@ -19,6 +19,7 @@
timeout=10
DEBUG=true
interaction=true
echo "" > /var/log/vp.log
log(){
if $DEBUG
then
......@@ -69,11 +70,18 @@ screens=$(xrandr | grep " connected" | cut -f 1 -d ' ' \
| sed -e 's/ /\n/g' | grep -v "\<$MAIN_SCREEN\>")
log "SCREENS '$screens'"
log "all '$screens$MAIN_SCREEN'"
log "cat '$(cat /tmp/vp-screens)'"
if [ -z "$screens$MAIN_SCREEN" ]
then
log "noscreens exiting on $(date)"
exit
elif [ "$screens$MAIN_SCREEN" == "$(cat /tmp/vp-screens)" ]
then
log "no changes exiting on $(date)"
exit
fi
echo "$screens$MAIN_SCREEN" > /tmp/vp-screens
clone(){
# Auto detect best resolution
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment