]> git.donarmstrong.com Git - neurodebian.git/blob - debian/neurodebian.postinst
97cbc86da5bd277e08c24792044d40e30aa01155
[neurodebian.git] / debian / neurodebian.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-configurerepo
11                 opts="--do-not-update"
12                 db_get neurodebian/release; [ "$RET" = "auto" ] || opts+=" -r '$RET'"
13                 db_get neurodebian/mirror;  nd_mirror="${RET##* }" # get just a url if it came together with alias
14                 db_get neurodebian/flavor;  nd_flavor="$RET"
15                 db_get neurodebian/components; nd_components="${RET// /}"
16
17                 db_get neurodebian/overwrite;  [ "$RET" = "true" ] && opts+=" --overwrite" || :
18                 db_get neurodebian/suffix;     [ "$RET" = "" ]     || opts+=" --suffix='$RET'" || :
19
20                 eval nd-configurerepo -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#