[pt-br] Update translation bits.
[tails-test.git] / auto / config
blobf614c9bc9fa08501eefa3546971f7377edafb1ca
1 #! /bin/sh
2 # automatically run by "lb config"
4 # we require building from git
5 if ! git rev-parse --is-inside-work-tree; then
6 echo "${PWD} is not a Git tree. Exiting."
7 exit 1
8 fi
10 . config/amnesia
11 if [ -e config/amnesia.local ] ; then
12 . config/amnesia.local
15 # init variables
16 RUN_LB_CONFIG="lb config noauto"
18 # init config/ with defaults for the target distribution
19 $RUN_LB_CONFIG --distribution wheezy ${@}
21 # set Amnesia's general options
22 $RUN_LB_CONFIG \
23 --apt-recommends false \
24 --backports false \
25 --binary-images iso \
26 --binary-indices false \
27 --checksums none \
28 --bootappend-live "${AMNESIA_APPEND}" \
29 --bootstrap "cdebootstrap" \
30 --archive-areas "main contrib non-free" \
31 --includes none \
32 --iso-application="The Amnesic Incognito Live System" \
33 --iso-publisher="https://tails.boum.org/" \
34 --iso-volume="TAILS ${AMNESIA_FULL_VERSION}" \
35 --memtest none \
36 --packages-lists="standard" \
37 --tasks="standard" \
38 --linux-packages="linux-image-3.14-1" \
39 --syslinux-menu vesamenu \
40 --syslinux-splash data/splash.png \
41 --syslinux-timeout 4 \
42 --initramfs=live-boot \
43 ${@}
45 # build i386 images on amd64 as well, include a bunch of kernels
46 hw_arch="`dpkg --print-architecture`"
47 if [ "$hw_arch" = i386 -o "$hw_arch" = amd64 ]; then
48 $RUN_LB_CONFIG \
49 --architecture i386 \
50 --linux-flavours "486 amd64" \
51 ${@}
52 # build powerpc images on powerpc64 as well, include only powerpc kernel
53 elif [ "$hw_arch" = powerpc -o "$hw_arch" = powerpc64 ]; then
54 $RUN_LB_CONFIG \
55 --architecture powerpc \
56 --linux-flavours powerpc \
57 ${@}
60 install -d config/chroot_local-includes/etc/amnesia/
62 # environment
63 TAILS_WIKI_SUPPORTED_LANGUAGES="$(ikiwiki-supported-languages ikiwiki.setup)"
64 [ -n "$TAILS_WIKI_SUPPORTED_LANGUAGES" ] || exit 16
65 echo "TAILS_WIKI_SUPPORTED_LANGUAGES='${TAILS_WIKI_SUPPORTED_LANGUAGES}'" \
66 >> config/chroot_local-includes/etc/amnesia/environment
68 # version
69 echo "${AMNESIA_FULL_VERSION}" > config/chroot_local-includes/etc/amnesia/version
70 if git rev-list HEAD 2>&1 >/dev/null; then
71 git rev-list HEAD | head -n 1 >> config/chroot_local-includes/etc/amnesia/version
73 echo "live-build: `dpkg-query -W -f='${Version}\n' live-build`" \
74 >> config/chroot_local-includes/etc/amnesia/version
75 # os-release
76 cat >> config/chroot_local-includes/etc/os-release <<EOF
77 TAILS_PRODUCT_NAME="Tails"
78 TAILS_VERSION_ID="$AMNESIA_VERSION"
79 EOF
81 # changelog
82 cp debian/changelog config/chroot_local-includes/usr/share/doc/amnesia/Changelog
84 # create readahead-list from squashfs.sort
85 if [ -e config/binary_rootfs/squashfs.sort ]; then
86 mkdir -p config/chroot_local-includes/usr/share/amnesia
87 sort -k2 -n -r config/binary_rootfs/squashfs.sort |
88 cut -d' ' -f1 > config/chroot_local-includes/usr/share/amnesia/readahead-list
91 # custom APT sources
92 tails-custom-apt-sources > config/chroot_sources/tails.chroot