Skip to content

Commit

Permalink
Refactor sandbox.tt
Browse files Browse the repository at this point in the history
-z
string is null, that is, has zero length

-n
string is not null.

Reference:
- https://tldp.org/LDP/abs/html/comparison-ops.html
  • Loading branch information
RyanofWoods committed Nov 9, 2022
1 parent ef20862 commit 611a98f
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions lib/solidus_dev_support/templates/extension/bin/sandbox.tt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash

set -e
if [ ! -z "$DEBUG" ]
if [ -n "$DEBUG" ]
then
set -x
fi
Expand All @@ -28,14 +28,12 @@ sqlite3|sqlite)
esac
echo "~~> Using $RAILSDB as the database engine"

if [ -n "$SOLIDUS_BRANCH" ]
if [ -z "$SOLIDUS_BRANCH" ]
then
BRANCH=$SOLIDUS_BRANCH
else
echo "~~> Use 'export SOLIDUS_BRANCH=[master|v3.2|...]' to control the Solidus branch"
BRANCH="master"
SOLIDUS_BRANCH="master"
fi
echo "~~> Using branch $BRANCH of solidus"
echo "~~> Using branch $SOLIDUS_BRANCH of solidus"

if [ -z "$SOLIDUS_FRONTEND" ]
then
Expand Down Expand Up @@ -68,7 +66,7 @@ fi

cd ./sandbox
cat <<RUBY >> Gemfile
gem 'solidus', github: 'solidusio/solidus', branch: '$BRANCH'
gem 'solidus', github: 'solidusio/solidus', branch: '$SOLIDUS_BRANCH'
gem 'rails-i18n'
gem 'solidus_i18n'
Expand Down

0 comments on commit 611a98f

Please sign in to comment.