+usage() {
+cat <<EOF
+ $0 [options]
+ --help,-h This help
+ --vps vps_name Name of the vps
+ --password password Password of the vps (only useful in case of no reboot)
+ --reinstall-first Start with reinstalling the vps
+ --host-user user Use another user (default: root)
+ --no-reboot Don't reboot
+ --no-reboot-start Don't reboot to rescue at the beginning
+ --no-reboot-end Don't reboot to normal at the end
+ --git-branch Use another puppet branch (default: master)
+EOF
+}
+
+set -e
+
+host_user=root
+git_branch=master
+
+while [ -n "$1" ]; do
+ case "$1" in
+ --vps)
+ vps_name="$2"
+ shift
+ ;;
+ --reinstall-first)
+ reinstall_first=1
+ ;;
+ --password)
+ password="$2"
+ shift
+ ;;
+ --host-user)
+ host_user="$2"
+ shift
+ ;;
+ --no-reboot)
+ no_reboot=1
+ ;;
+ --no-reboot-start)
+ no_reboot_start=1
+ ;;
+ --no-reboot-end)
+ no_reboot_end=1
+ ;;
+ --git-branch)
+ git_branch="$2"
+ shift
+ ;;
+ --help|-h)
+ usage
+ exit 0
+ ;;
+ esac
+
+ shift
+done
+