diff --git a/cd.sh b/cd.sh index 5717dbd..1a5b638 100644 --- a/cd.sh +++ b/cd.sh @@ -1,7 +1,6 @@ -#! /usr/bin/env bash +#! /usr/bin/env sh -CD_NAME='cd' -CD_PROJECTS_PARENT='rwx' +set 'cd' 'rwx' function cd_main { cd_set_environment @@ -20,8 +19,8 @@ function cd_main { cd_install_git cd_install_python cd_clean_packages_cache - cd_install - cd_bootstrap + cd_install "${@}" + cd_bootstrap "${@}" } function cd_set_environment { @@ -252,10 +251,7 @@ local repository local root cd_step "${FUNCNAME}" root="$(mktemp --directory)" || exit - for repository in \ - "${CD_PROJECTS_PARENT}" \ - "${CD_NAME}" \ - ; do + for repository in "${@}" ; do git clone \ "${CD_PROJECTS_URL}/${repository}" "${root}/${repository}" \ || exit @@ -268,7 +264,7 @@ local root function cd_bootstrap { cd_step "${FUNCNAME}" - "${CD_PYTHON_COMMAND}" -m "${CD_NAME}" + "${CD_PYTHON_COMMAND}" -m "${1}" } cd_main