Changeset 2417


Ignore:
Timestamp:
Feb 15, 2013, 6:58:03 PM (6 years ago)
Author:
sam
Message:

build: fork lol-bitten.sh from a temporary copy to avoid locks in Windows.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/build/run-bitten.sh

    r2088 r2417  
    1111    conffile="`mktemp 2>/dev/null`"
    1212fi
     13scriptfile=""
    1314builddir="${tmpdir}/lol-bitten-`whoami`"
    1415url="http://lol.zoy.org/builds"
     
    2324
    2425cleanup() {
    25     rm -f "${conffile}"
     26    rm -f "${conffile}" "${scriptfile}"
    2627    rm -rf "${builddir}"
    2728}
     
    3334}
    3435
    35 trap bailout HUP INT QUIT ABRT KILL ALRM TERM
     36trap bailout EXIT HUP INT QUIT ABRT KILL ALRM TERM
     37
     38#
     39# Fork if necessary
     40#
     41
     42if [ "$1" = "--forked" ]; then
     43    shift
     44    scriptfile="$1"
     45    shift
     46else
     47    cp "$0" "${conffile}"
     48    chmod +x "${conffile}"
     49    exec "${conffile}" --forked "${conffile}" "$@"
     50    exit 0
     51fi
    3652
    3753#
     
    4056
    4157if [ "$#" != 2 ]; then
    42     echo "Usage: $0 <username> <password>"
     58    echo "Usage: run-bitten.sh <username> <password>"
    4359    exit 1
    4460fi
     
    239255done
    240256
    241 bailout
    242 
     257exit 0
     258
Note: See TracChangeset for help on using the changeset viewer.