summaryrefslogtreecommitdiff
path: root/bin/tinbuild_internals_Darwin.sh
blob: e235af5fcec1fee35b444a1c431b023552f83005 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/usr/bin/env bash
#
#
#    Copyright (C) 2011-2012 Norbert Thiebaud
#    License: GPLv3+

# Do we have timeout? If yes, guard git pull with that - which has a
# tendency to hang forever, when connection is flaky
if which gtimeout > /dev/null 2>&1 ; then
    # MacPorts/self-built - timeout is two hours
    timeout="`which gtimeout` 2h"
fi

epoch_from_utc()
{
    date -juf '%Y-%m-%d %H:%M:%S' "$1 $2" '+%s'
}

epoch_to_utc()
{
    date -juf '%s' $1
}

print_date()
{
    date -u '+%Y-%m-%d %H:%M:%S'
}

deliver_lo_to_bibisect()
{
    rm -fr ${ARTIFACTDIR?}/opt
    mkdir ${ARTIFACTDIR?}/opt
    cp -fR ${optdir}/LibreOffice.app ${ARTIFACTDIR?}/opt/
}