Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix sh compatibility

  • Loading branch information...
commit 0693eeb29b0a90b8dac931dd6360c60b5276fa54 1 parent 600d88b
@mpapis mpapis authored
Showing with 12 additions and 19 deletions.
  1. +12 −19 bin/sm-installer
View
31 bin/sm-installer
@@ -12,24 +12,17 @@ case $platform in
;;
esac
-params=()
-while test $# -gt 0
-do
- case "${1:-}" in
- (--from)
- sm_owner=${2:-}
- shift 2
- ;;
- (--path)
- sm_path=${2:-}
- shift 2
- ;;
- (*)
- params+=( "$1" )
- shift
- ;;
- esac
-done
+if test "${1:-}" = "--from"
+then
+ sm_owner=${2:-}
+ shift 2
+fi
+
+if test "${1:-}" = "--path"
+then
+ sm_path=${2:-}
+ shift 2
+fi
if test -z "${sm_curl_command:-}"
then
@@ -72,4 +65,4 @@ builtin cd "${sm_path}/src/${sm_owner}-sm"
${sm_tar_command} xzf "${sm_path}/archives/${sm_owner}-sm.tar.gz"
mv ${sm_owner}-sm-*/* .
rm -rf ${sm_owner}-sm-*
-"${sm_path}/zsh-bin/zsh" ./install --zsh "${sm_path}/zsh-bin/zsh" "${params[@]}"
+"${sm_path}/zsh-bin/zsh" ./install --zsh "${sm_path}/zsh-bin/zsh" "$@"
Please sign in to comment.
Something went wrong with that request. Please try again.