mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-11 07:18:08 +00:00
Merge pull request #2977 from pmzqla/configure-whitespace
configure: don't fail when $CPPFLAGS starts with a white space
This commit is contained in:
commit
e2ac4ebf9d
6
configure
vendored
6
configure
vendored
@ -5801,15 +5801,15 @@ _ACEOF
|
|||||||
|
|
||||||
# Original extract() function contributed by pmzqla
|
# Original extract() function contributed by pmzqla
|
||||||
# $*: Strings to parse
|
# $*: Strings to parse
|
||||||
# Set $DEFINES, $INCLUDES, $OTHER
|
# Set $QBT_CONF_DEFINES, $QBT_CONF_INCLUDES, $QBT_CONF_EXTRA_CFLAGS
|
||||||
extract() {
|
extract() {
|
||||||
if [ -z "$*" ]; then
|
if [ -z "$*" ]; then
|
||||||
echo "Input string required"
|
echo "Input string required"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Convert " -" to "\n" if not between quotes
|
# Convert " -" to "\n" if not between quotes and remove possible leading white spaces
|
||||||
string=$(echo " $*" | $SED -e 's: -:\n:g' -e 's:"\(.*\)\n\(.*\)":\"\1 -\2":g' -e "s:'\(.*\)\n\(.*\)':\'\1 -\2':g")
|
string=$(echo " $*" | $SED -e 's: -:\n:g' -e 's:"\(.*\)\n\(.*\)":\"\1 -\2":g' -e "s:'\(.*\)\n\(.*\)':\'\1 -\2':g" -e 's/^[:space:]*//')
|
||||||
SAVEIFS=$IFS
|
SAVEIFS=$IFS
|
||||||
IFS=$(printf "\n\b")
|
IFS=$(printf "\n\b")
|
||||||
for i in $string; do
|
for i in $string; do
|
||||||
|
@ -251,15 +251,15 @@ AX_DEFINE_DIR([EXPAND_MANDIR], [mandir])
|
|||||||
|
|
||||||
# Original extract() function contributed by pmzqla
|
# Original extract() function contributed by pmzqla
|
||||||
# $*: Strings to parse
|
# $*: Strings to parse
|
||||||
# Set $DEFINES, $INCLUDES, $OTHER
|
# Set $QBT_CONF_DEFINES, $QBT_CONF_INCLUDES, $QBT_CONF_EXTRA_CFLAGS
|
||||||
extract() {
|
extract() {
|
||||||
if [[ -z "$*" ]]; then
|
if [[ -z "$*" ]]; then
|
||||||
echo "Input string required"
|
echo "Input string required"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Convert " -" to "\n" if not between quotes
|
# Convert " -" to "\n" if not between quotes and remove possible leading white spaces
|
||||||
string=$(echo " $*" | $SED -e 's: -:\n:g' -e 's:"\(.*\)\n\(.*\)":\"\1 -\2":g' -e "s:'\(.*\)\n\(.*\)':\'\1 -\2':g")
|
string=$(echo " $*" | $SED -e 's: -:\n:g' -e 's:"\(.*\)\n\(.*\)":\"\1 -\2":g' -e "s:'\(.*\)\n\(.*\)':\'\1 -\2':g" -e 's/^[[:space:]]*//')
|
||||||
SAVEIFS=$IFS
|
SAVEIFS=$IFS
|
||||||
IFS=$(printf "\n\b")
|
IFS=$(printf "\n\b")
|
||||||
for i in $string; do
|
for i in $string; do
|
||||||
|
Loading…
Reference in New Issue
Block a user