config.in 484 B

1234567891011121314151617181920212223242526
  1. #!/bin/sh
  2. # vim:set fileencoding=utf-8 et ts=4 sts=4 sw=4:
  3. set -e
  4. PREFERENCES=/etc/apt/listchanges.conf
  5. . /usr/share/debconf/confmodule
  6. runPython()
  7. {
  8. temp=`tempfile -p aptlc -s .py`
  9. trap "rm -f $temp" EXIT
  10. cat > "$temp" << 'EOF'
  11. #DEBCONF_HELPER_PY#
  12. EOF
  13. python3 -B "$temp" "$@"
  14. }
  15. if which python3 2>/dev/null >&2; then
  16. runPython config "$PREFERENCES" "$@"
  17. else
  18. echo "Deferring configuration of apt-listchanges until python3 is available" >&2
  19. exit 0
  20. fi