liyujie
2025-08-28 786ff4f4ca2374bdd9177f2e24b503d43e7a3b93
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
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/bin/bash
 
set -e
 
: ${N_JOBS:=2}
 
if [ "$STL" != "" ]
then
  STLARG="-stdlib=$STL"
fi
 
case $OS in
linux*)
    case $OS in
    linux)     DOCKER_IMAGE="polettimarco/fruit-basesystem:ubuntu-$UBUNTU" ;;
    linux-arm) docker run --rm --privileged multiarch/qemu-user-static:register --reset
               DOCKER_IMAGE="polettimarco/fruit-basesystem:ubuntu_arm-$UBUNTU" ;;
    esac
    docker rm -f fruit &>/dev/null || true
    docker run -d -it --name fruit --privileged "${DOCKER_IMAGE}"
    docker exec fruit mkdir fruit
    docker cp . fruit:/fruit
 
    docker exec fruit bash -c "
        export COMPILER=$COMPILER;
        export N_JOBS=$N_JOBS;
        export STLARG=$STLARG;
        export ASAN_OPTIONS=$ASAN_OPTIONS;
        export OS=$OS;
        cd fruit; extras/scripts/postsubmit-helper.sh $1"
    exit $?
    ;;
 
osx)
    export COMPILER
    export N_JOBS
    export STLARG
    export ASAN_OPTIONS
    export OS
    extras/scripts/postsubmit-helper.sh "$@"
    exit $?
    ;;
 
*)
    echo "Unsupported OS: $OS"
    exit 1
esac