summaryrefslogtreecommitdiff
path: root/host-update
blob: a66fc12fba17f73c87581cb23c824e8656d04752 (plain)
  1. #!/bin/sh
  2. usage () {
  3. echo "Usage: $(basename $0) {host}"
  4. }
  5. termwrapper () {
  6. title="$title $titleopt"
  7. echo $@
  8. echo xsh --title "Host update" --host $HOST $@ && touch /etc/local-LOCAL/machines/$args
  9. xsh --title "Host update" --host $HOST $@ && touch /etc/local-LOCAL/machines/$args
  10. }
  11. args=''
  12. argc=0
  13. while [ $# -gt 0 ]; do
  14. case $1 in
  15. -*) usage; exit 1;;
  16. *) args="$args $1"; argc=$(($argc+1));;
  17. esac
  18. shift
  19. done
  20. set -- $args
  21. if [ $argc -ne 1 ]; then
  22. usage; exit 1;
  23. fi
  24. HOST=$1
  25. termwrapper "apt-get update; apt-get upgrade"