X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=debian%2Fneurodebian.postinst;fp=debian%2Fneurodebian.postinst;h=0e3a3f535a17b6ecdef90e3fecb7e03f71789c3c;hb=441723d6edfc6b868be27bfa4ad63dc7a2fefdb8;hp=97cbc86da5bd277e08c24792044d40e30aa01155;hpb=6c6fa9cd3bd627a60f165682f96af3cc06d9ccc9;p=neurodebian.git diff --git a/debian/neurodebian.postinst b/debian/neurodebian.postinst index 97cbc86..0e3a3f5 100755 --- a/debian/neurodebian.postinst +++ b/debian/neurodebian.postinst @@ -7,26 +7,32 @@ set -e case "$1" in configure) - # obtain all the options and call nd-configurerepo - opts="--do-not-update" - db_get neurodebian/release; [ "$RET" = "auto" ] || opts+=" -r '$RET'" - db_get neurodebian/mirror; nd_mirror="${RET##* }" # get just a url if it came together with alias - db_get neurodebian/flavor; nd_flavor="$RET" - db_get neurodebian/components; nd_components="${RET// /}" - - db_get neurodebian/overwrite; [ "$RET" = "true" ] && opts+=" --overwrite" || : - db_get neurodebian/suffix; [ "$RET" = "" ] || opts+=" --suffix='$RET'" || : - - eval nd-configurerepo -m "$nd_mirror" -c "$nd_components" $opts - ;; - abort-upgrade|abort-remove|abort-deconfigure) - # nothing to do - ;; - - *) - echo "postinst called with unknown argument \`$1'" >&2 - exit 1 - ;; + db_get neurodebian/enable + if [ "$RET" = "true" ]; then + # obtain all the options and call nd-configurerepo + opts="--do-not-update" + db_get neurodebian/release; [ "$RET" = "auto" ] || opts+=" -r '$RET'" + db_get neurodebian/mirror; nd_mirror="${RET##* }" # get just a url if it came together with alias + db_get neurodebian/flavor; nd_flavor="$RET" + db_get neurodebian/components; nd_components="${RET// /}" + + db_get neurodebian/overwrite; [ "$RET" = "true" ] && opts+=" --overwrite" || : + db_get neurodebian/suffix; [ "$RET" = "" ] || opts+=" --suffix='$RET'" || : + + eval nd-configurerepo -m "$nd_mirror" -c "$nd_components" $opts + else + # removing neurodebian APT configs + rm -f /etc/apt/sources.list.d/neurodebian.sources*.list + fi + ;; + abort-upgrade|abort-remove|abort-deconfigure) + # nothing to do + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; esac #DEBHELPER#