source: branches/help/SH/arb_wait

Last change on this file was 19552, checked in by westram, 38 hours ago
  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 411 bytes
Line 
1#!/bin/bash
2
3# if ARB_WAIT_TIMEOUT is set and contains a positive integer (>0), else 0
4if [[ -n ${ARB_WAIT_TIMEOUT+x} && ${ARB_WAIT_TIMEOUT} =~ ^[1-9][0-9]*$ ]]; then
5  SECWAIT=${ARB_WAIT_TIMEOUT}
6else
7  SECWAIT=0
8fi
9
10if [ "${SECWAIT}" = 0 ]; then
11    echo "[Press ENTER to close window]"
12    read A
13else
14    echo "[Press ENTER or wait ${SECWAIT} seconds to close window]"
15    read -t ${SECWAIT} A
16    true
17fi
18
Note: See TracBrowser for help on using the repository browser.