From: shingil.kang Date: Wed, 1 Jul 2015 07:03:54 +0000 (+0900) Subject: Modify the install and remove script on Ubuntu/MacOS to fix whitespace path issue. X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=390b638e54e79d332452179ce57a512ee47769d3;p=sdk%2Ftools%2Fsdb.git Modify the install and remove script on Ubuntu/MacOS to fix whitespace path issue. - cover the path including whitespace in quotes. Change-Id: I803ec5a349f8f79670602dc983fdf902e4fc4116 Signed-off-by: shingil.kang --- diff --git a/package/sdb.install.linux b/package/sdb.install.linux index 28fd785..5094258 100755 --- a/package/sdb.install.linux +++ b/package/sdb.install.linux @@ -11,7 +11,7 @@ ENABLE_SDB_COMPLETION="# Enable programmable sdb completion features.\nif [ -f ~ # autocomplete setting rm -rf ${SDB_SETTING_PATH} mkdir -p ${SDB_SETTING_PATH} -mv -f ${SDB_AC_SRC_PATH} ${SDB_AC_DST_PATH} +mv -f "${SDB_AC_SRC_PATH}" "${SDB_AC_DST_PATH}" if [ -f "${BASH_RC}" ]; then if [ -z $(grep "source ~/\.sdb/\.sdb-completion\.bash" "${BASH_RC}") ]; then diff --git a/package/sdb.install.macos-64 b/package/sdb.install.macos-64 index 8b6f13e..2bdf271 100755 --- a/package/sdb.install.macos-64 +++ b/package/sdb.install.macos-64 @@ -9,7 +9,7 @@ ENABLE_SDB_COMPLETION="# Enable programmable sdb completion features.\nif [ -f ~ rm -rf ${SDB_SETTING_PATH} mkdir -p ${SDB_SETTING_PATH} -mv -f ${SDB_AC_SRC_PATH} ${SDB_AC_DST_PATH} +mv -f "${SDB_AC_SRC_PATH}" "${SDB_AC_DST_PATH}" if [ -f "${BASH_RC}" ]; then if [ -z $(grep "source ~/\.sdb/\.sdb-completion\.bash" "${BASH_RC}") ]; then diff --git a/package/sdb.remove.linux b/package/sdb.remove.linux index 302ad4b..0bc534a 100755 --- a/package/sdb.remove.linux +++ b/package/sdb.remove.linux @@ -1,11 +1,11 @@ #!/bin/bash -ex SDB_PATH=tools/sdb -if [ -f ${INSTALLED_PATH}/${SDB_PATH}]; then - ${INSTALLED_PATH}/${SDB_PATH} kill-server +if [ -f "${INSTALLED_PATH}/${SDB_PATH}" ]; then + "${INSTALLED_PATH}/${SDB_PATH}" kill-server fi -rm -rf ${INSTALLED_PATH}/${SDB_PATH} +rm -rf "${INSTALLED_PATH}/${SDB_PATH}" rm -rf ~/.sdb if [ -f ~/.bashrc ]; then sed -i -E '/# Enable programmable sdb completion features/,/fi/d' ~/.bashrc diff --git a/package/sdb.remove.macos-64 b/package/sdb.remove.macos-64 index e71e321..0c02193 100755 --- a/package/sdb.remove.macos-64 +++ b/package/sdb.remove.macos-64 @@ -2,11 +2,11 @@ SDB_PATH=tools/sdb BASH_RC=~/.profile -if [ -f ${INSTALLED_PATH}/${SDB_PATH} ]; then - ${INSTALLED_PATH}/${SDB_PATH} kill-server +if [ -f "${INSTALLED_PATH}/${SDB_PATH}" ]; then + "${INSTALLED_PATH}/${SDB_PATH}" kill-server fi -rm -rf ${INSTALLED_PATH}/${SDB_PATH} +rm -rf "${INSTALLED_PATH}/${SDB_PATH}" rm -rf ~/.sdb if [ -f ${BASH_RC} ]; then sed -i -E '/# Enable programmable sdb completion features/,/fi/d' ${BASH_RC}