mirror of
https://github.com/libretro/RetroArch
synced 2025-03-03 13:14:04 +00:00
Merge pull request #8229 from orbea/qb
qb: Check number of arguments for while loops.
This commit is contained in:
commit
8936972ba2
@ -16,7 +16,7 @@ add_define()
|
||||
# $@ = include or library paths
|
||||
add_dirs()
|
||||
{ ADD="$1"; LINK="${1%"${1#?}"}"; shift
|
||||
while [ "$1" ]; do
|
||||
while [ $# -gt 0 ]; do
|
||||
eval "${ADD}_DIRS=\"\${${ADD}_DIRS} -${LINK}${1}\""
|
||||
shift
|
||||
done
|
||||
@ -292,7 +292,7 @@ create_config_header()
|
||||
{ printf %s\\n "#ifndef $name" "#define $name" '' \
|
||||
"#define PACKAGE_NAME \"$PACKAGE_NAME\""
|
||||
|
||||
while [ "$1" ]; do
|
||||
while [ $# -gt 0 ]; do
|
||||
case "$(eval "printf %s \"\$HAVE_$1\"")" in
|
||||
'yes')
|
||||
n='0'
|
||||
@ -361,7 +361,7 @@ create_config_make()
|
||||
"BUILD = $BUILD" \
|
||||
"PREFIX = $PREFIX"
|
||||
|
||||
while [ "$1" ]; do
|
||||
while [ $# -gt 0 ]; do
|
||||
case "$(eval "printf %s \"\$HAVE_$1\"")" in
|
||||
'yes')
|
||||
n='0'
|
||||
|
@ -73,7 +73,7 @@ parse_input() # Parse stuff :V
|
||||
#OPTS contains all available options in config.params.sh - used to speedup
|
||||
#things in opt_exists()
|
||||
|
||||
while [ "$1" ]; do
|
||||
while [ $# -gt 0 ]; do
|
||||
case "$1" in
|
||||
--prefix=*) PREFIX=${1##--prefix=};;
|
||||
--global-config-dir=*|--sysconfdir=*) GLOBAL_CONFIG_DIR="${1#*=}";;
|
||||
@ -101,6 +101,8 @@ parse_input() # Parse stuff :V
|
||||
eval "$opt=\"$val\""
|
||||
;;
|
||||
-h|--help) print_help; exit 0;;
|
||||
--) break ;;
|
||||
'') : ;;
|
||||
*) die 1 "Unknown option $1";;
|
||||
esac
|
||||
shift
|
||||
|
Loading…
x
Reference in New Issue
Block a user