summaryrefslogtreecommitdiff
path: root/bin/grml-live-git
blob: dc2b051d00ef4e696dc028d64e4365fe3d0d7103 (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
#!/bin/sh

# usage e.g., as root:
#     % cd ~/local/big
#     % grml-live-git -s buster -a amd64 -c GRMLBASE,GRML_FULL,AMD64,SPWHITTON

set -e

us="$(basename $0)"

if ! [ -e "$HOME/src/grml-live/.git" ]; then
    echo >&2 "$us: grml-live not checked out"
    exit 1
fi

cd "$HOME/src/grml-live"

if ! [ -z "$(git status --porcelain)" ]; then
   echo >&2 "$us: changes should be committed first"
   exit 1
fi

if ! git verify-commit --raw HEAD 2>&1 \
       | grep "VALIDSIG .* 8DC2487E51ABDD90B5C4753F0F56D0553B6D411B"; then
    echo >&2 "$us: grml-live branch commit not signed by Sean"
    exit 1
fi

# standard env vars for running grml-live from git
export GRML_FAI_CONFIG="$HOME/src/grml-live/etc/grml/fai"
export SCRIPTS_DIRECTORY="$HOME/src/grml-live/scripts"
export LIVE_CONF="$HOME/src/grml-live/etc/grml/grml-live.conf"

# use apt-cacher-ng
export APT_PROXY="http://localhost:3142/"

./grml-live -t $HOME/src/grml-live/templates/ -S $HOME/src/grml-live/scripts/ $@