WIP
This commit is contained in:
@@ -1,10 +1,6 @@
|
||||
#!/usr/bin/env zsh
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# source "$JJ_SOURCE_DIR/bashUtils/index.sh"
|
||||
|
||||
osDependencies=(${=OS_DEPENDENCIES})
|
||||
|
||||
for osDependency in $osDependencies ; do
|
||||
for osDependency in $OS_DEPENDENCIES ; do
|
||||
if ! hash $osDependency; then
|
||||
jjCliLog jjLogWarning "bashUtils/ensureDependency.sh Unable to find OS package '$osDependency'. Installing now..."
|
||||
eval "$PACKAGE_MANAGER_INSTALL $osDependency"
|
||||
@@ -20,11 +16,7 @@ if [[ -e $ASDF_DIR/asdf.sh ]]; then
|
||||
fi
|
||||
|
||||
|
||||
asdfInstalledVersionPrefix=$(asdf info 2> /dev/null | grep -A 1 'ASDF VERSION' | tail -1 | grep "^${ASDF_VERSION}")
|
||||
|
||||
if [[ -z "${asdfInstalledVersionPrefix}" ]] || \
|
||||
! hash asdf || \
|
||||
[[ "${asdfInstalledVersionPrefix}" != "$ASDF_VERSION" ]] || \
|
||||
if ! hash asdf || \
|
||||
[[ ! -e $JJ_SOURCE_DIR/~~tmp/deps/asdf-tools-installed ]] \
|
||||
|| jjIsFileNewerFile "$ASDF_DEFAULT_TOOL_VERSIONS_FILENAME" "$JJ_SOURCE_DIR/~~tmp/deps/asdf-tools-installed" ; then
|
||||
rm -rf $ASDF_DIR
|
||||
@@ -39,11 +31,11 @@ if [[ -z "${asdfInstalledVersionPrefix}" ]] || \
|
||||
set +e
|
||||
while read tool_and_version; do
|
||||
jjCliLog jjLog "... checking tool: $tool_and_version"
|
||||
tool_and_version_split=(${=tool_and_version})
|
||||
# echo ${tool_and_version_split[1]}
|
||||
# echo ${tool_and_version_split[2]}
|
||||
asdf plugin add ${tool_and_version_split[1]} || true
|
||||
asdf install ${tool_and_version_split[1]} ${tool_and_version_split[2]}
|
||||
tool_and_version_split=(${tool_and_version})
|
||||
echo ${tool_and_version_split[0]}
|
||||
echo ${tool_and_version_split[1]}
|
||||
asdf plugin add ${tool_and_version_split[0]} || true
|
||||
asdf install ${tool_and_version_split[0]} ${tool_and_version_split[1]}
|
||||
done <${ASDF_DEFAULT_TOOL_VERSIONS_FILENAME}
|
||||
asdf install
|
||||
set -e
|
||||
|
||||
Reference in New Issue
Block a user