Loading lock-cable.sh +12 −8 Original line number Diff line number Diff line Loading @@ -37,19 +37,23 @@ fi while [ -z ${CABLE} ] do if [ ! -f ${CABLES_LOCKED_FOLDER}/blue.lock ] sleep 1 if [ -f ${CABLES_LOCKED_FOLDER}/blue.lock ] && [ -f ${CABLES_LOCKED_FOLDER}/red.lock ] && [ -f ${CABLES_LOCKED_FOLDER}/green.lock ] then continue fi CABLE=blue elif [ ! -f ${CABLES_LOCKED_FOLDER}/red.lock ] then CABLE=red elif [ ! -f ${CABLES_LOCKED_FOLDER}/green.lock ] if [ -f ${CABLES_LOCKED_FOLDER}/red.lock ] && [ ! -f ${CABLES_LOCKED_FOLDER}/green.lock ] then CABLE=green elif [ -f ${CABLES_LOCKED_FOLDER}/blue.lock ] && [ ! -f ${CABLES_LOCKED_FOLDER}/red.lock ] then CABLE=red fi sleep 1 done echo ${CABLE} Loading Loading
lock-cable.sh +12 −8 Original line number Diff line number Diff line Loading @@ -37,19 +37,23 @@ fi while [ -z ${CABLE} ] do if [ ! -f ${CABLES_LOCKED_FOLDER}/blue.lock ] sleep 1 if [ -f ${CABLES_LOCKED_FOLDER}/blue.lock ] && [ -f ${CABLES_LOCKED_FOLDER}/red.lock ] && [ -f ${CABLES_LOCKED_FOLDER}/green.lock ] then continue fi CABLE=blue elif [ ! -f ${CABLES_LOCKED_FOLDER}/red.lock ] then CABLE=red elif [ ! -f ${CABLES_LOCKED_FOLDER}/green.lock ] if [ -f ${CABLES_LOCKED_FOLDER}/red.lock ] && [ ! -f ${CABLES_LOCKED_FOLDER}/green.lock ] then CABLE=green elif [ -f ${CABLES_LOCKED_FOLDER}/blue.lock ] && [ ! -f ${CABLES_LOCKED_FOLDER}/red.lock ] then CABLE=red fi sleep 1 done echo ${CABLE} Loading