Skip to content
This repository was archived by the owner on Jan 25, 2022. It is now read-only.

Commit 9ea69ea

Browse files
committed
Streamline IF statements.
1 parent 7ada4fc commit 9ea69ea

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

commands/self-update

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,13 @@ WPLIB_BOX_CLI_DEBUG_LOG_FILE="/opt/box/log/cli-debug.log"
1414
DEFAULT_VERSION="master"
1515

1616
# Determine version to run.
17-
if [ "$1" == "" ]
18-
then
17+
if [ "" != "$1" ] ; then
18+
VERSION="$1"
19+
else
1920
VERSION="$(cat "${WPLIB_BOX_CLI_VERSION_FILE}")"
20-
if [ "$DEFAULT_VERSION" == "" ]
21-
then
21+
if [ "$DEFAULT_VERSION" == "" ] ; then
2222
VERSION=${DEFAULT_VERSION}
2323
fi
24-
else
25-
VERSION="$1"
2624
fi
2725

2826
echo "# WPLib-Box: Updating ${WPLIB_BOX_CLI_DIR} with version ${VERSION}"

0 commit comments

Comments
 (0)