refactor: change double shifts into shift 2 in the option parser
This commit is contained in:
parent
4b3cb8ac0d
commit
8d2b99bf46
54
quickemu
54
quickemu
|
@ -1628,8 +1628,7 @@ else
|
||||||
case "${1}" in
|
case "${1}" in
|
||||||
-access|--access)
|
-access|--access)
|
||||||
ACCESS="${2}"
|
ACCESS="${2}"
|
||||||
shift
|
shift 2;;
|
||||||
shift;;
|
|
||||||
-braille|--braille)
|
-braille|--braille)
|
||||||
BRAILLE="on"
|
BRAILLE="on"
|
||||||
shift;;
|
shift;;
|
||||||
|
@ -1642,8 +1641,7 @@ else
|
||||||
-display|--display)
|
-display|--display)
|
||||||
OUTPUT="${2}"
|
OUTPUT="${2}"
|
||||||
display_param_check
|
display_param_check
|
||||||
shift
|
shift 2;;
|
||||||
shift;;
|
|
||||||
-fullscreen|--fullscreen|-full-screen|--full-screen)
|
-fullscreen|--fullscreen|-full-screen|--full-screen)
|
||||||
FULLSCREEN="-full-screen"
|
FULLSCREEN="-full-screen"
|
||||||
FULLSPICY="--full-screen"
|
FULLSPICY="--full-screen"
|
||||||
|
@ -1669,8 +1667,7 @@ else
|
||||||
echo "ERROR! No snapshot tag provided."
|
echo "ERROR! No snapshot tag provided."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
shift
|
shift 2;;
|
||||||
shift;;
|
|
||||||
-status-quo|--status-quo)
|
-status-quo|--status-quo)
|
||||||
STATUS_QUO="-snapshot"
|
STATUS_QUO="-snapshot"
|
||||||
shift;;
|
shift;;
|
||||||
|
@ -1679,60 +1676,46 @@ else
|
||||||
shift;;
|
shift;;
|
||||||
-vm|--vm)
|
-vm|--vm)
|
||||||
VM="${2}"
|
VM="${2}"
|
||||||
shift
|
shift 2;;
|
||||||
shift;;
|
|
||||||
-viewer|--viewer)
|
-viewer|--viewer)
|
||||||
VIEWER="${2}"
|
VIEWER="${2}"
|
||||||
shift
|
shift 2;;
|
||||||
shift;;
|
|
||||||
-width|--width)
|
-width|--width)
|
||||||
width="${2}"
|
width="${2}"
|
||||||
shift;
|
shift 2;;
|
||||||
shift;;
|
|
||||||
-height|--height)
|
-height|--height)
|
||||||
height="${2}"
|
height="${2}"
|
||||||
shift;
|
shift 2;;
|
||||||
shift;;
|
|
||||||
-ssh-port|--ssh-port)
|
-ssh-port|--ssh-port)
|
||||||
SSH_PORT="${2}"
|
SSH_PORT="${2}"
|
||||||
shift;
|
shift 2;;
|
||||||
shift;;
|
|
||||||
-spice-port|--spice-port)
|
-spice-port|--spice-port)
|
||||||
SPICE_PORT="${2}"
|
SPICE_PORT="${2}"
|
||||||
shift;
|
shift 2;;
|
||||||
shift;;
|
|
||||||
-public-dir|--public-dir)
|
-public-dir|--public-dir)
|
||||||
PUBLIC="${2}"
|
PUBLIC="${2}"
|
||||||
shift;
|
shift 2;;
|
||||||
shift;;
|
|
||||||
-monitor|--monitor)
|
-monitor|--monitor)
|
||||||
MONITOR="${2}"
|
MONITOR="${2}"
|
||||||
shift;
|
shift 2;;
|
||||||
shift;;
|
|
||||||
-monitor-cmd|--monitor-cmd)
|
-monitor-cmd|--monitor-cmd)
|
||||||
MONITOR_CMD="${2}"
|
MONITOR_CMD="${2}"
|
||||||
shift;
|
shift 2;;
|
||||||
shift;;
|
|
||||||
-monitor-telnet-host|--monitor-telnet-host)
|
-monitor-telnet-host|--monitor-telnet-host)
|
||||||
MONITOR_TELNET_HOST="${2}"
|
MONITOR_TELNET_HOST="${2}"
|
||||||
shift;
|
shift 2;;
|
||||||
shift;;
|
|
||||||
-monitor-telnet-port|--monitor-telnet-port)
|
-monitor-telnet-port|--monitor-telnet-port)
|
||||||
MONITOR_TELNET_PORT="${2}"
|
MONITOR_TELNET_PORT="${2}"
|
||||||
shift;
|
shift 2;;
|
||||||
shift;;
|
|
||||||
-serial|--serial)
|
-serial|--serial)
|
||||||
SERIAL="${2}"
|
SERIAL="${2}"
|
||||||
shift;
|
shift 2;;
|
||||||
shift;;
|
|
||||||
-serial-telnet-host|--serial-telnet-host)
|
-serial-telnet-host|--serial-telnet-host)
|
||||||
SERIAL_TELNET_HOST="${2}"
|
SERIAL_TELNET_HOST="${2}"
|
||||||
shift;
|
shift 2;;
|
||||||
shift;;
|
|
||||||
-serial-telnet-port|--serial-telnet-port)
|
-serial-telnet-port|--serial-telnet-port)
|
||||||
SERIAL_TELNET_PORT="${2}"
|
SERIAL_TELNET_PORT="${2}"
|
||||||
shift;
|
shift 2;;
|
||||||
shift;;
|
|
||||||
-keyboard|--keyboard)
|
-keyboard|--keyboard)
|
||||||
keyboard="${2}"
|
keyboard="${2}"
|
||||||
shift 2;;
|
shift 2;;
|
||||||
|
@ -1747,8 +1730,7 @@ else
|
||||||
shift 2;;
|
shift 2;;
|
||||||
-extra_args|--extra_args)
|
-extra_args|--extra_args)
|
||||||
extra_args+="${2}"
|
extra_args+="${2}"
|
||||||
shift;
|
shift 2;;
|
||||||
shift;;
|
|
||||||
-sound-card|--sound-card)
|
-sound-card|--sound-card)
|
||||||
sound_card="${2}"
|
sound_card="${2}"
|
||||||
shift 2;;
|
shift 2;;
|
||||||
|
|
Loading…
Reference in New Issue