summaryrefslogtreecommitdiffstats
path: root/auto/config
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@ubuntu.com>2015-05-16 00:42:29 -0400
committerLibravatarUnit 193 <unit193@ubuntu.com>2015-05-16 00:42:29 -0400
commit00b967901c48b722a680c7f18d8d3a219a14bf3b (patch)
tree5db157b4a39fca301c1e5f218a905c383937f605 /auto/config
downloadxebian-lb-config-00b967901c48b722a680c7f18d8d3a219a14bf3b.tar.bz2
xebian-lb-config-00b967901c48b722a680c7f18d8d3a219a14bf3b.tar.xz
xebian-lb-config-00b967901c48b722a680c7f18d8d3a219a14bf3b.tar.zst
Initial commit
Diffstat (limited to 'auto/config')
-rwxr-xr-xauto/config80
1 files changed, 80 insertions, 0 deletions
diff --git a/auto/config b/auto/config
new file mode 100755
index 0000000..f3d918f
--- /dev/null
+++ b/auto/config
@@ -0,0 +1,80 @@
+#!/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 \
+ --iso-application "Xubuntu" \
+ --iso-publisher "Unit 193" \
+ --iso-volume "Xubuntu Live" \
+ --linux-packages linux-image \
+ --bootappend-live "boot=live nocomponents=xfce4-panel noconfig=sudo username=xubuntu hostname=xubuntu" \
+ $lb_opts \
+ "$@"