aboutsummaryrefslogtreecommitdiffstats
path: root/jjb/common/include-agl-header.sh
blob: 2dbf92695316e3818e8cd4399d2f66485cc0dff5 (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
35
36
37
38
@media only all and (prefers-color-scheme: dark) {
.highlight .hll { background-color: #49483e }
.highlight .c { color: #75715e } /* Comment */
.highlight .err { color: #960050; background-color: #1e0010 } /* Error */
.highlight .k { color: #66d9ef } /* Keyword */
.highlight .l { color: #ae81ff } /* Literal */
.highlight .n { color: #f8f8f2 } /* Name */
.highlight .o { color: #f92672 } /* Operator */
.highlight .p { color: #f8f8f2 } /* Punctuation */
.highlight .ch { color: #75715e } /* Comment.Hashbang */
.highlight .cm { color: #75715e } /* Comment.Multiline */
.highlight .cp { color: #75715e } /* Comment.Preproc */
.highlight .cpf { color: #75715e } /* Comment.PreprocFile */
.highlight .c1 { color: #75715e } /* Comment.Single */
.highlight .cs { color: #75715e } /* Comment.Special */
.highlight .gd { color: #f92672 } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .gi { color: #a6e22e } /* Generic.Inserted */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #75715e } /* Generic.Subheading */
.highlight .kc { color: #66d9ef } /* Keyword.Constant */
.highlight .kd { color: #66d9ef } /* Keyword.Declaration */
.highlight .kn { color: #f92672 } /* Keyword.Namespace */
.highlight .kp { color: #66d9ef } /* Keyword.Pseudo */
.highlight .kr { color: #66d9ef } /* Keyword.Reserved */
.highlight .kt { color: #66d9ef } /* Keyword.Type */
.highlight .ld { color: #e6db74 } /* Literal.Date */
.highlight .m { color: #ae81ff } /* Literal.Number */
.highlight .s { color: #e6db74 } /* Literal.String */
.highlight .na { color: #a6e22e } /* Name.Attribute */
.highlight .nb { color: #f8f8f2 } /* Name.Builtin */
.highlight .nc { color: #a6e22e } /* Name.Class */
.highlight .no { color: #66d9ef } /* Name.Constant */
.highlight .nd { color: #a6e22e } /* Name.Decorator */
.highlight .ni { color: #f8f8f2 } /* Name.Entity */
.highlight .ne { color: #a6e22e } /* Name.Exception */
.highlight .nf { color: #a6e22e } /* Name.Function */
.highlight .nl { color: #f8f8f2 } /* Name.Label */
.highlight .nn { color: #f8f8f2 } /* Name.Namespace */
.highlight .nx { color: #a6e22e } /* Name.Other */
.highlight .py { color: #f8f8f2 } /* Name.Property */
.highlight .nt { color: #f92672 } /* Name.Tag */
.highlight .nv { color: #f8f8f2 } /* Name.Variable */
.highlight .ow { color: #f92672 } /* Operator.Word */
.highlight .w { color: #f8f8f2 } /* Text.Whitespace */
.highlight .mb { color: #ae81ff } /* Literal.Number.Bin */
.highlight .mf { color: #ae81ff } /* Literal.Number.Float */
.highlight .mh { color: #ae81ff } /* Literal.Number.Hex */
.highlight .mi { color: #ae81ff } /* Literal.Number.Integer */
.highlight .mo { color: #ae81ff } /* Literal.Number.Oct */
.highlight .sa { color: #e6db74 } /* Literal.String.Affix */
.highlight .sb { color: #e6db74 } /* Literal.String.Backtick */
.highlight .sc { color: #e6db74 } /* Literal.String.Char */
.highlight .dl { color: #e6db74 } /* Literal.String.Delimiter */
.highlight .sd { color: #e6db74 } /* Literal.String.Doc */
.highlight .s2 { color: #e6db74 } /* Literal.String.Double */
.highlight .se { color: #ae81ff } /* Literal.String.Escape */
.highlight .sh { color: #e6db74 } /* Literal.String.Heredoc */
.highlight .si { color: #e6db74 } /* Literal.String.Interpol */
.highlight .sx { color: #e6db74 } /* Literal.String.Other */
.highlight .sr { color: #e6db74 } /* Literal.String.Regex */
.highlight .s1 { color: #e6db74 } /* Literal.String.Single */
.highlight .ss { color: #e6db74 } /* Literal.String.Symbol */
.highlight .bp { color: #f8f8f2 } /* Name.Builtin.Pseudo */
.highlight .fm { color: #a6e22e } /* Name.Function.Magic */
.highlight .vc { color: #f8f8f2 } /* Name.Variable.Class */
.highlight .vg { color: #f8f8f2 } /* Name.Variable.Global */
.highlight .vi { color: #f8f8f2 } /* Name.Variable.Instance */
.highlight .vm { color: #f8f8f2 } /* Name.Variable.Magic */
.highlight .il { color: #ae81ff } /* Literal.Number.Integer.Long */
}
@media (prefers-color-scheme: light) {
.highlight .hll { background-color: #ffffcc }
.highlight .c { color: #888888 } /* Comment */
.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
.highlight .k { color: #008800; font-weight: bold } /* Keyword */
.highlight .ch { color: #888888 } /* Comment.Hashbang */
.highlight .cm { color: #888888 } /* Comment.Multiline */
.highligh
#!/bin/bash
# (c) 2016 Jan-Simon Moeller dl9pf(at)gmx.de
# License GPLv2
#
# debugging purposes
set -e

################################################################################
## Header
################################################################################


# VARIABLES
OPTIND=1
#export DLHOST="http://download.automotivelinux.org/"
# DLHOST in auto.conf
export NOGFX=false
export VERBOSE=false
export DEBUG=false
function vprint() {
    :
}
function dprint() {
    :
}

# defaults for project, branch, refspec
export TARGETPROJECT="AGL/AGL-repo"
export TARGETBRANCH="master"
export TARGETREFSPEC="refs/heads/master"

export TARGETFEATURESnogfx="agl-ci-change-features-nogfx"
export TARGETFEATURES="agl-ci-change-features"

export TARGETQA=""
export TARGETIMAGE="agl-demo-platform\${TARGETQA}"
export TARGETIMAGEnogfx="agl-image-ivi-crosssdk"

export TARGETSDKIMAGE="agl-demo-platform-crosssdk"


# apply GERRIT_*
if test -n "${GERRIT_PROJECT}"; then
    export TARGETPROJECT="${GERRIT_PROJECT}"
fi
if test -n "${GERRIT_BRANCH}"; then
    export TARGETBRANCH="${GERRIT_BRANCH}"
fi
if test -n "${GERRIT_REFSPEC}"; then
    export TARGETREFSPEC="${GERRIT_REFSPEC}"
fi

if test x"" = x"${MACHINE}"; then
    export MACHINE="qemux86-64"
fi

# finally cmdline arguments
while getopts ":b:i:p:r:dnqvx" opt; do
    case "$opt" in
	b)
	    export TARGETBRANCH="$OPTARG"
	    ;;
	d)
	    DEBUG=true
	    function dprint() {
		echo "DEBUG: $@"
	    }
	    ;;
	i)
	    export TARGETIMAGE="$OPTARG"
	    ;;
	n)
	    export NOGFX=true
	    ;;
	p)
	    export TARGETPROJECT="$OPTARG"
	    ;;
	q)
	    export TARGETQA="-qa"
	    ;;
	r)
	    export TARGETREFSPEC="$OPTARG"
	    ;;
	v)
	    VERBOSE=true
	    function vprint() {
		echo "VERBOSE: \"$@\""
	    }
	    ;;
	x)
	    set -x
	    ;;
	h|\?)
	    echo "$0 [-h/-?] -bdinpqrvx"
	    echo "--------------------------------------------------------------------------------"
	    echo "  -b <branch>  - name of the branch to use          (default=master)"
	    echo "  -d           - debug"
	    echo "  -i <image>   - name of the image to build         (default=agl-demo-platform)"
	    echo "  -n           - no graphics (no wayland, aka no drivers)"
	    echo "  -p <project> - project to use                     (default=AGL/AGL-repo)"
	    echo "  -q           - build '*-qa' images                (default='')"
	    echo "  -r <refspec> - refspec to use                     (default=refs/heads/master)"
	    echo "  -v           - verbose"
	    echo "  -x           - set -x"
	    echo "--------------------------------------------------------------------------------"
	    echo "  GERRIT_PROJECT, GERRIT_BRANCH, GERRIT_REFSPEC are used if present,"
	    echo "  but cmdline arguments take precedence."
	    echo "--------------------------------------------------------------------------------"
	    exit 1
	    ;;
	:)
	    echo "Option -$OPTARG required an argument."
	    exit 1
	    ;;
    esac
done

# expand
eval TARGETIMAGE="$TARGETIMAGE"
eval TARGETIMAGEnogfx="$TARGETIMAGEnogfx"

# The 'real' machine name
export TARGETMACHINE=${MACHINE}

# bail out if we're not the 'BUILDONLY' machine
if test -n "${BUILDONLY}" ; then
    if test x"ignore" != x"${BUILDONLY}" ; then
	if test x"${MACHINE}" != x"${BUILDONLY}" ; then
	    echo "Skipping ${MACHINE} as BUILDONLY is ${BUILDONLY}."
	    exit 1
	fi
    fi
fi

# The exceptions
if $NOGFX; then
    export TARGETIMAGE=${TARGETIMAGEnogfx}
    export TARGETFEATURES="${TARGETFEATURESnogfx}"
fi
# porter-nogfx means no graphic drivers
if test x"porter-nogfx" = x"$MACHINE"; then
    export TARGETIMAGE=${TARGETIMAGEnogfx}
    export TARGETFEATURES="${TARGETFEATURESnogfx}"
    export TARGETMACHINE="porter"
    export TARGETSDKIMAGE="agl-image-ivi-crosssdk"
fi
# m3ulcb-nogfx means no graphic drivers
if test x"m3ulcb-nogfx" = x"$MACHINE"; then
    export TARGETIMAGE=${TARGETIMAGEnogfx}
    export TARGETFEATURES="${TARGETFEATURESnogfx}"
    export TARGETMACHINE="m3ulcb"
    export TARGETSDKIMAGE="agl-image-ivi-crosssdk"
fi
# h3ulcb-nogfx means no graphic drivers
if test x"h3ulcb-nogfx" = x"$MACHINE"; then
    export TARGETIMAGE=${TARGETIMAGEnogfx}
    export TARGETFEATURES="${TARGETFEATURESnogfx}"
    export TARGETMACHINE="h3ulcb"
    export TARGETSDKIMAGE="agl-image-ivi-crosssdk"
fi

#if $DEBUG; then
set | grep ^TARGET || true
set | grep ^GERRIT || true
set | grep ^MACHINE || true
#fi

if test ! -f ~/.gitconfig ; then 
  git config --global user.email "jenkins-dontreply@build.automotivelinux.org"
  git config --global user.name "jenkins-dontreply@build.automotivelinux.org"
fi