update 692 B

123456789101112131415161718192021222324252627282930
  1. #!/bin/sh
  2. set -e
  3. # Get the configuration from /etc/apt/apt.conf
  4. OPTS="-f"
  5. APTGET="/usr/bin/apt-get"
  6. APTCACHE="/usr/bin/apt-cache"
  7. DPKG="/usr/bin/dpkg"
  8. CACHEDIR="/var/cache/apt"
  9. PROMPT="no"
  10. RES=`apt-config shell OPTS DSelect::UpdateOptions \
  11. DPKG Dir::Bin::dpkg APTGET Dir::Bin::apt-get \
  12. APTCACHE Dir::Bin::apt-cache CACHEDIR Dir::Cache \
  13. PROMPT DSelect::PromptAfterUpdate`
  14. eval $RES
  15. $APTGET $OPTS update
  16. echo "Merging Available information"
  17. rm -f /var/cache/apt/available
  18. $APTCACHE dumpavail > $CACHEDIR/available
  19. $DPKG --update-avail $CACHEDIR/available
  20. rm -f $CACHEDIR/available
  21. if [ $PROMPT = "yes" ]; then
  22. echo "Press enter to continue." && read RES;
  23. fi
  24. exit 0