Commit ddc9e48c authored by Alexander Schlarb's avatar Alexander Schlarb

make-ring: Avoid unquoted shell variables wherever possible (install.sh)

Change-Id: I9d580743ebe40a8c9edc534ba23b5ddbb01e921b
parent 2d6169b0
......@@ -15,7 +15,7 @@ set -ex
global=false
static=''
client=''
proc=''
proc='1'
while getopts gsc:p: OPT; do
case "$OPT" in
g)
......@@ -37,7 +37,7 @@ while getopts gsc:p: OPT; do
done
make_install() {
if $1; then
if [ "$1" = "true" ]; then
sudo make install
# Or else the next non-sudo install will fail, because this generates some
# root owned files like install_manifest.txt under the build directory.
......@@ -50,7 +50,7 @@ make_install() {
TOP="$(pwd)"
INSTALL="${TOP}/install"
if $global; then
if [ "${global}" = "true" ]; then
BUILDDIR="build-global"
else
BUILDDIR="build-local"
......@@ -71,38 +71,38 @@ if [[ "$OSTYPE" != "darwin"* ]]; then
sharedLib="--disable-shared"
fi
if $global; then
if [ "${global}" = "true" ]; then
./configure $sharedLib $CONFIGURE_FLAGS
else
./configure $sharedLib $CONFIGURE_FLAGS --prefix="${INSTALL}/daemon"
fi
make -j${proc}
make_install $global
make -j"${proc}"
make_install "${global}"
cd "${TOP}/lrc"
mkdir -p ${BUILDDIR}
cd ${BUILDDIR}
if $global; then
cmake .. -DCMAKE_PREFIX_PATH=$CMAKE_PREFIX_PATH -DCMAKE_BUILD_TYPE=Debug $static
mkdir -p "${BUILDDIR}"
cd "${BUILDDIR}"
if [ "${global}" = "true" ]; then
cmake .. -DCMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH}" -DCMAKE_BUILD_TYPE=Debug $static
else
cmake .. -DCMAKE_PREFIX_PATH=$CMAKE_PREFIX_PATH \
cmake .. -DCMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH}" \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_INSTALL_PREFIX="${INSTALL}/lrc" \
-DRING_BUILD_DIR="${DAEMON}/src" $static
fi
make -j${proc}
make_install $global
make -j"${proc}"
make_install "${global}"
cd "${TOP}/${client}"
mkdir -p ${BUILDDIR}
cd ${BUILDDIR}
if $global; then
cmake .. -DCMAKE_PREFIX_PATH=$CMAKE_PREFIX_PATH $static
mkdir -p "${BUILDDIR}"
cd "${BUILDDIR}"
if [ "${global}" = "true" ]; then
cmake .. -DCMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH}" $static
else
cmake .. -DCMAKE_PREFIX_PATH=$CMAKE_PREFIX_PATH \
cmake .. -DCMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH}" \
-DCMAKE_INSTALL_PREFIX="${INSTALL}/${client}" \
-DRINGTONE_DIR="${INSTALL}/daemon/share/ring/ringtones" \
-DLibRingClient_DIR="${INSTALL}/lrc/lib/cmake/LibRingClient" $static
fi
make -j${proc}
make_install $global
make -j"${proc}"
make_install "${global}"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment