You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

13 lines
270 B

  1. #!/bin/sh
  2. apt_opt=
  3. if [ $# -eq 0 ]; then
  4. : # interactive
  5. elif [ "${1:-}" = "-y" ]; then
  6. apt_opt="-y"
  7. shift
  8. fi
  9. aptget="apt-get${apt_opt:+ $apt_opt}"
  10. cmd="$aptget update && $aptget autoremove --purge && $aptget upgrade && $aptget dist-upgrade"
  11. exec sudo sh -c "$cmd"