Skip to content

Commit

Permalink
Use test instead of shell magic
Browse files Browse the repository at this point in the history
Because [ and [[ are both a lie.
  • Loading branch information
nikitabobko committed Nov 29, 2024
1 parent d172dfd commit 84c30b9
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion build-docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ rm -rf .site && mkdir .site
rm -rf .man && mkdir .man

build_version="0.0.0-SNAPSHOT"
while [[ $# -gt 0 ]]; do
while test $# -gt 0; do
case $1 in
--build-version) build_version="$2"; shift 2;;
*) echo "Unknown option $1" > /dev/stderr; exit 1 ;;
Expand Down
2 changes: 1 addition & 1 deletion build-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ source ./script/setup.sh

build_version="0.0.0-SNAPSHOT"
codesign_identity="aerospace-codesign-certificate"
while [[ $# -gt 0 ]]; do
while test $# -gt 0; do
case $1 in
--build-version) build_version="$2"; shift 2;;
--codesign-identity) codesign_identity="$2"; shift 2;;
Expand Down
2 changes: 1 addition & 1 deletion generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export XCODEGEN_AEROSPACE_CODE_SIGN_IDENTITY="aerospace-codesign-certificate"
build_version="0.0.0-SNAPSHOT"
generate_xcodeproj=1
all=0
while [[ $# -gt 0 ]]; do
while test $# -gt 0; do
case $1 in
--build-version) build_version="$2"; shift 2 ;;
--codesign-identity) XCODEGEN_AEROSPACE_CODE_SIGN_IDENTITY="$2"; shift 2 ;;
Expand Down
2 changes: 1 addition & 1 deletion install-from-sources.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ cd "$(dirname "$0")"
source ./script/setup.sh

rebuild=1
while [[ $# -gt 0 ]]; do
while test $# -gt 0; do
case $1 in
--dont-rebuild) rebuild=0; shift ;;
*) echo "Unknown option $1"; exit 1 ;;
Expand Down
2 changes: 1 addition & 1 deletion script/build-brew-cask.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ zip_uri='' # mandatory
cask_name='' # mandatory
build_version="0.0.0-SNAPSHOT"
app_bundle_dir_name='AeroSpace.app'
while [[ $# -gt 0 ]]; do
while test $# -gt 0; do
case $1 in
--build-version) build_version="$2"; shift 2;;
--zip-uri) zip_uri="$2"; shift 2;;
Expand Down
2 changes: 1 addition & 1 deletion script/install-dep.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ complgen=0
swiftlint=0
swiftformat=0
xcodegen=0
while [[ $# -gt 0 ]]; do
while test $# -gt 0; do
case $1 in
--antlr) antlr=1; shift ;;
--complgen) complgen=1; shift ;;
Expand Down
2 changes: 1 addition & 1 deletion script/publish-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ source ./script/setup.sh
build_version=""
cask_git_repo_path=""
site_git_repo_path=""
while [[ $# -gt 0 ]]; do
while test $# -gt 0; do
case $1 in
--build-version) build_version="$2"; shift 2;;
--cask-git-repo-path) cask_git_repo_path="$2"; shift 2;;
Expand Down

0 comments on commit 84c30b9

Please sign in to comment.