summaryrefslogtreecommitdiffstats
path: root/auto/config
blob: a6541eb4fbf48e1e18d1b2a5ef49c9f06170cf41 (plain) (blame)
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
#!/bin/sh

# You can put local mirrors here if you want
mirror=http://httpredir.debian.org/debian/

# Detect target architecture and filter args
temp=""
arch=$(dpkg --print-architecture)
dist="stretch"
lb_opts=""
while [ $# -gt 0 ]; do
	arg="$1"
	case "$arg" in
	-a|--arch|--architecture|--architectures)
		arch="$2"
		temp="$temp "'"'"$arg"'"'
		temp="$temp "'"'"$2"'"'
		shift
		;;
	--liquorix)
		liquorix="1"
		;;
	--sid|--unstable)
		dist="sid"
		;;
	*)
		temp="$temp "'"'"$arg"'"'
		;;
	esac
	shift
done
eval set -- "$temp"

if [ -n "$liquorix" ]; then
	mkdir -p config/archives
	echo "deb http://mirror.unit193.net/liquorix sid main" \
		> config/archives/liquorix.list.chroot
	echo "deb http://mirror.unit193.net/liquorix sid main" \
		> config/archives/liquorix.list.binary
fi

case "$arch" in
    amd64)
	if [ -n "$liquorix" ]; then
	    lb_opts="$lb_opts --debian-installer live --linux-flavours liquorix-amd64"
	else
	    lb_opts="$lb_opts --debian-installer live"
	fi
    ;;
    i386)
	if [ -n "$liquorix" ]; then
	    lb_opts="$lb_opts --debian-installer live --linux-flavours liquorix-686-pae"
	else
	    lb_opts="$lb_opts --debian-installer live --linux-flavours 686-pae"
	fi
    ;;
    armel|armhf)
	lb_opts="$lb_opts --binary-images hdd --binary-filesystem ext4 --chroot-filesystem none"
    ;;
    *)
	echo "WARNING: configuration not tested on arch $arch" >&2
    ;;
esac

lb config noauto \
	--distribution "$dist" \
	--debian-installer-distribution "$dist" \
	--archive-areas "main contrib non-free" \
	--bootstrap cdebootstrap \
	--mirror-bootstrap "$mirror" \
	--mirror-debian-installer "$mirror" \
	--firmware-binary true \
	--firmware-chroot true \
	--image-name "xebian-$dist" \
	--iso-application "Xebian" \
	--iso-publisher "Unit 193" \
	--iso-volume "Xebian Live" \
	--linux-packages linux-image \
	--bootappend-live "boot=live nocomponents=xfce4-panel username=xebian hostname=xebian" \
	$lb_opts \
	"$@"