mirror of
https://github.com/znc/znc.git
synced 2026-08-07 01:13:25 +02:00
znc-buildmod: Don't choke on spaces
In shell scripts you always have to be careful about spaces. Better at some "" too much than one too few. Now spaces in the pathname for the module and spaces in some other paths should work correctly. Thanks to Nirjen for noticing this. git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1689 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
+8
-8
@@ -25,8 +25,8 @@ check_binary()
|
||||
fi
|
||||
}
|
||||
|
||||
check_binary ${SED}
|
||||
check_binary ${ZNC_CONFIG} "Please (re)install ZNC."
|
||||
check_binary "${SED}"
|
||||
check_binary "${ZNC_CONFIG}" "Please (re)install ZNC."
|
||||
|
||||
if test "x$CXX" = "x" ; then
|
||||
CXX=`${ZNC_CONFIG} --cxx`
|
||||
@@ -50,7 +50,7 @@ LDFLAGS="`${ZNC_CONFIG} --libznc` $LDFLAGS"
|
||||
# Get the first word and strip away the first two chars (which is -I)
|
||||
INC_PATH=`echo ${INCLUDES} | ${SED} 's: .*::' | ${SED} 's:^..::'`
|
||||
|
||||
if test ! -d ${INC_PATH}; then
|
||||
if test ! -d "${INC_PATH}"; then
|
||||
echo "${ERROR} Unable to find znc include dir [${INC_PATH}]. Please (re)install ZNC."
|
||||
exit 1
|
||||
fi
|
||||
@@ -63,14 +63,14 @@ do
|
||||
MOD="${FILE%.cpp}"
|
||||
MOD="${MOD%.cc}"
|
||||
|
||||
if test ! -f ${FILE}; then
|
||||
echo "${ERROR} Building ${MOD}.so... File not found"
|
||||
if test ! -f "${FILE}"; then
|
||||
echo "${ERROR} Building \"${MOD}.so\"... File not found"
|
||||
else
|
||||
printf "Building ${MOD}.so... "
|
||||
if ${CXX} ${CXXFLAGS} ${INCLUDES} ${LDFLAGS} ${LIBS} -shared -o ${MOD}.so ${FILE} ; then
|
||||
printf "Building \"${MOD}.so\"... "
|
||||
if ${CXX} ${CXXFLAGS} ${INCLUDES} ${LDFLAGS} ${LIBS} -shared -o "${MOD}.so" "${FILE}" ; then
|
||||
echo "${OK}"
|
||||
else
|
||||
echo "${ERROR} Error while building ${MOD}.so"
|
||||
echo "${ERROR} Error while building \"${MOD}.so\""
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user