Debian Codegraph @

scripts/build_native_lib_in_clean_repo.sh

raw symbols SCIP
1 #!/usr/bin/envscip-shell filesystem . . `/usr/bin/env`. bash
2
3 #Helper script to be called from build_both_dylib_and_dylib.sh
4 #
5 #checkout and clone a new copy of gatk in a tmpdir
6 #build the .so file and return its location
7 #this can only be run on broad machines
8 #
9 # usage build_native_lib_in_clean_repo.sh <commit hash> <git-project> <library name> <path to lib>
10
11 set -v
12
13 COMMIT=$1
14 PROJECT=$2
15 LIB_NAME=$3
16 LIB_PATH=$4
17
18
19 source /broad/tools/scripts/useusescip-shell source . . `/broad/tools/scripts/useuse`.
20 reuse Git-2.11
21
22 set -e
23
24 export TMPDIR="/broad/hptmpscip-shell filesystem . . `/broad/hptmp`."
25
26 echoerrscip-shell shell gatk-fermilite 1.2.1+dfsg-3 echoerr().() { echoscip-shell system . . echo. "$@" 1>&2; }
27
28 PROJECT_TMP_DIR=`mktempscip-shell system . . mktemp. --tmpdir -d 2>/dev/nullscip-shell filesystem . . `/dev/null`. || mktempscip-shell system . . mktemp. -d -t 'mytmpdir'`
29
30 echoerrscip-shell shell gatk-fermilite 1.2.1+dfsg-3 echoerr(). "Moving to $PROJECT_TMP_DIR"
31 cd "$PROJECT_TMP_DIR"
32
33 echoerrscip-shell shell gatk-fermilite 1.2.1+dfsg-3 echoerr(). "cloning broadinstitute/${PROJECT}"
34 GIT_LFS_SKIP_SMUDGE=1 gitscip-shell system . . git. clone [email protected]:broadinstitute/${PROJECT}.git 1>2
35
36 echoerrscip-shell shell gatk-fermilite 1.2.1+dfsg-3 echoerr(). "Moving to $PROJECT"
37 cd $PROJECT
38
39 echoerrscip-shell shell gatk-fermilite 1.2.1+dfsg-3 echoerr(). "Checking out ${commit}"
40 GIT_LFS_SKIP_SMUDGE=1 gitscip-shell system . . git. checkout -f "$COMMIT" 1>2
41
42 echoerrscip-shell shell gatk-fermilite 1.2.1+dfsg-3 echoerr(). "performing gradle build"
43 ./gradlew build 1>2 --no-daemon
44
45 LIB=$(pwdscip-shell system . . pwd.)/$(findscip-shell system . . find. $LIB_PATH -name "${LIB_NAME}*" ! -name "*.a" )
46 echoerrscip-shell shell gatk-fermilite 1.2.1+dfsg-3 echoerr(). "created $LIB"
47
48 echoscip-shell system . . echo. $LIB
49 exit 0