7 GIT_TOPLEVEL_DIR
=$
(git rev-parse
--show-toplevel)
8 .
"$GIT_TOPLEVEL_DIR"/auto
/scripts
/utils.sh
10 OVERLAY
=$
(branch_name_to_suite
"$(git_current_branch)")
11 OVERLAY_FILE
="${GIT_TOPLEVEL_DIR}/config/APT_overlays.d/${OVERLAY}"
12 TICKET
=$
(git_current_branch | perl
-p -E 's/.*?(\d{4,6}).*/$1/')
15 echo "Usage: $NAME [OPTION]
16 Enables an APT overlay for the current topic branch.
19 --print Don't do anything, just print the name of the suite
20 --wait Wait for the suite to be created on the server. This does *not* enable the APT overlay.
21 --enable This is the normal behavior: enables an APT overlay
26 url
="https://deb.tails.boum.org/dists/${OVERLAY}"
27 while ! curl
-s --fail "$url" > /dev
/null
33 NAME
=$
(basename "${0}")
34 LONGOPTS
="wait,print,enable,help"
35 if ! getopt
-Qq -o "" --longoptions $LONGOPTS -n "${NAME}" -- "$@"
37 echo "Use --help for usage information" >&2
40 OPTS
=$
(getopt
-o "" --longoptions $LONGOPTS -n "${NAME}" -- "$@")
42 while [ $# -gt 0 ]; do
62 touch "${OVERLAY_FILE}"
63 git add
"${OVERLAY_FILE}"
64 git commit
-m "Enable the ${OVERLAY} APT overlay (refs: #${TICKET})."