]> git.donarmstrong.com Git - neurodebian.git/blob - debian/neurodebian-repository.postinst
Move keyring into Depends for repository since we do not apt-get update anyways
[neurodebian.git] / debian / neurodebian-repository.postinst
1 #!/bin/bash
2
3 set -e
4
5 . /usr/share/debconf/confmodule
6
7
8 case "$1" in
9     configure)
10                 # obtain all the options and call nd-aptenable
11                 opts="--do-not-update"
12                 db_get neurodebian-repository/release; [ "$RET" = "auto" ] || opts+=" -r '$RET'"
13                 db_get neurodebian-repository/mirror;  nd_mirror="${RET##* }" # get just a url if it came together with alias
14                 db_get neurodebian-repository/flavor;  nd_flavor="$RET"
15                 db_get neurodebian-repository/components; nd_components="${RET// /}"
16
17                 db_get neurodebian-repository/overwrite;  [ "$RET" = "true" ] && opts+=" --overwrite" || :
18                 db_get neurodebian-repository/suffix;     [ "$RET" = "" ]     || opts+=" --suffix='$RET'" || :
19
20                 eval nd-aptenable -m "$nd_mirror" -c "$nd_components" $opts
21     ;;
22     abort-upgrade|abort-remove|abort-deconfigure)
23         # nothing to do
24     ;;
25
26     *)
27         echo "postinst called with unknown argument \`$1'" >&2
28         exit 1
29     ;;
30 esac
31
32 #DEBHELPER#