File: build.sh

package info (click to toggle)
debian-cd 3.1.35
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 8,304 kB
  • sloc: sh: 6,955; perl: 4,866; makefile: 417
file content (95 lines) | stat: -rwxr-xr-x 1,843 bytes parent folder | download | duplicates (2)
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
#!/bin/bash -e

# Script to build images for one or more architectures and/or source

if [ -z "$CF" ] ; then
    CF=./CONF.sh
fi
. $CF

START=`date -u`
echo "$START: Using CONF from $CF."

if [ -z "$COMPLETE" ] ; then
    export COMPLETE=1
fi

if [ $# -gt 1 ] ; then
    echo "ERROR: too many arguments." >&2
    exit 1
elif [ -n "$1" ] ; then
    export ARCHES="$1"
fi

PATH=$BASEDIR/tools:$PATH
export PATH

if [ "$TASK"x = ""x ] ; then
	case "$INSTALLER_CD"x in
		"1"x)
			TASK=debian-installer
			unset COMPLETE
			;;
		"2"x|"C"x)
			TASK=debian-installer+kernel
			unset COMPLETE
			;;
		*)
			COMPLETE=1
			;;
	esac
fi

export TASK COMPLETE

make distclean
make ${CODENAME}_status
echo " ... checking your mirror"
RET=""
make mirrorcheck || RET=$?
if [ "$RET" ]; then
	echo "ERROR: Your mirror has a problem, please correct it." >&2
	exit 1
fi

if [ -z "$IMAGETARGET" ] ; then
    IMAGETARGET="official_images"
fi
echo " ... building the images; using target(s) \"$IMAGETARGET\""

if [ "$MAXISOS"x = ""x ] ; then
    export MAXISOS="ALL"
fi
if [ "$MAXJIGDOS"x = ""x ] ; then
    export MAXJIGDOS="ALL"
fi

if [ "$MAXISOS" = "all" ] || [ "$MAXISOS" = "ALL" ] ; then
    NUMISOS="all available"
elif [ "$MAXISOS" -eq 0 ] ; then
    NUMISOS="no"
else
    NUMISOS="up to $MAXISOS"
fi
if [ "$MAXJIGDOS" = "all" ] || [ "$MAXJIGDOS" = "ALL" ] ; then
    NUMJIGDOS="all available"
elif [ "$MAXJIGDOS" -eq 0 ] ; then
    NUMJIGDOS="no"
else
    NUMJIGDOS="up to $MAXJIGDOS"
fi
echo "Building $NUMJIGDOS jigdos and $NUMISOS isos for $ARCHES $DISKTYPE"

if [ "$IMAGETARGET" = "official_images" ] && [ ! -z "$PARALLEL_MAKE_IMAGE" ]; then
    make ok init packagelists image-trees
    make -j $PARALLEL_MAKE_IMAGE parallel_images
else
    make $IMAGETARGET
fi

if [ "$IMAGESUMS"x = 1x ]; then
	make imagesums
fi

END=`date -u`
echo "$END: Finished."