5 APT_MIRROR_URL
="http://deb.tails.boum.org/"
6 DEFAULT_COMPONENTS
="main"
11 test -n "$(git tag -l "$tag")"
14 version_was_released
() {
17 version
="$(echo "$version" | tr '~' '-')"
18 git_tag_exists
"$version"
21 version_in_changelog
() {
22 dpkg-parsechangelog |
awk '/^Version: / { print $2 }'
25 output_apt_binary_source
() {
27 local components
="${2:-$DEFAULT_COMPONENTS}"
29 echo "deb $APT_MIRROR_URL $suite $components"
33 git branch |
awk '/^\* / { print $2 }'
37 current_branch |
grep -qE '^(feature|bug|bugfix)/'
40 branch_name_to_suite
() {
43 echo "$branch" |
sed -e 's,[^.a-z0-9-],-,ig' |
tr '[A-Z]' '[a-z]'
47 if version_was_released
"$(version_in_changelog)"; then
48 output_apt_binary_source
"$(branch_name_to_suite "$
(version_in_changelog
)")"
49 elif [ "$(current_branch)" = "stable" ]; then
50 output_apt_binary_source stable
51 elif [ "$(current_branch)" = "testing" ]; then
52 output_apt_binary_source testing
53 elif [ "$(current_branch)" = "experimental" ]; then
54 output_apt_binary_source experimental
56 output_apt_binary_source devel
59 if on_topic_branch
; then
60 output_apt_binary_source
"$(branch_name_to_suite $(current_branch))"