From 641a9de75d8729c79dda85adbc74420c8c5afb19 Mon Sep 17 00:00:00 2001 From: liuhuan Date: Thu, 16 Jun 2016 07:04:28 +0800 Subject: [PATCH] if is empty then [: =: unary operator expected --- vimfiles/tools/shell/bash/update-tags.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vimfiles/tools/shell/bash/update-tags.sh b/vimfiles/tools/shell/bash/update-tags.sh index 56c87854..fca5b2de 100644 --- a/vimfiles/tools/shell/bash/update-tags.sh +++ b/vimfiles/tools/shell/bash/update-tags.sh @@ -3,12 +3,12 @@ # create tags echo "Creating Tags..." -if [ ${CUSTOM} = true ]; then +if [[ ${CUSTOM} = true ]]; then echo " |- move custom ctags to ${TARGET}" cp "${SOURCE}" "${TARGET}" else # choose ctags path first - if [ -f "${DEST}/files" ]; then + if [[ -f "${DEST}/files" ]]; then FILES="-L ${DEST}/files" else FILES="-R ." @@ -19,7 +19,7 @@ else ${CTAGS_CMD} -o "${TMP}" ${OPTIONS} "${FILES}" # replace old file - if [ -f "${TMP}" ]; then + if [[ -f "${TMP}" ]]; then echo " |- move ${TMP} to ${TARGET}" mv -f "${TMP}" "${TARGET}" fi