feat: install, logging improvements
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
|
||||
# skip if CODESPACES is set
|
||||
if [ -n "$CODESPACES" ]; then
|
||||
echo -e "${GREY}Running in a GitHub Codespace${NC}"
|
||||
echo -e "${YELLOW}Running in a GitHub Codespace${NC}"
|
||||
export SKIP_SSH_CONFIG=1
|
||||
fi
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ export PYENV_ROOT="$HOME/.pyenv"
|
||||
if ! echo $PATH | grep -q "$PYENV_ROOT"; then
|
||||
export PATH="$PYENV_ROOT/bin:$PATH"
|
||||
fi
|
||||
if ! command -v "pyenv" &>/dev/null; then
|
||||
if ! command -v pyenv &>/dev/null; then
|
||||
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
|
||||
# https://github.com/pyenv/pyenv/wiki#suggested-build-environment
|
||||
sudo apt-get install -qq build-essential libssl-dev zlib1g-dev \
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
export PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring
|
||||
|
||||
if ! command -v "python" &>/dev/null; then
|
||||
if ! command -v python &>/dev/null; then
|
||||
pyenv install 3.12.1
|
||||
pyenv global 3.12.1
|
||||
fi
|
||||
@@ -38,7 +38,7 @@ fi
|
||||
mkdir -p ~/.local/bin
|
||||
unset local_bin_path
|
||||
|
||||
if ! command -v "pipx" &>/dev/null; then
|
||||
if ! command -v pipx &>/dev/null; then
|
||||
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
|
||||
sudo apt-get install -qq pipx
|
||||
elif [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
@@ -48,7 +48,7 @@ fi
|
||||
|
||||
echo "pipx $(pipx --version)"
|
||||
|
||||
if ! command -v "poetry" &>/dev/null; then
|
||||
if ! command -v poetry &>/dev/null; then
|
||||
pipx install poetry
|
||||
fi
|
||||
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
|
||||
[ -s "$NVM_DIR/nvm.sh" ] && source "$NVM_DIR/nvm.sh"
|
||||
|
||||
nvm_version="0.39.7"
|
||||
if ! command -v "nvm" &>/dev/null; then
|
||||
nvm_version="0.40.3"
|
||||
if ! command -v nvm &>/dev/null; then
|
||||
bash -c "$(curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v${nvm_version}/install.sh)"
|
||||
[ -s "$NVM_DIR/nvm.sh" ] && source "$NVM_DIR/nvm.sh"
|
||||
fi
|
||||
@@ -25,9 +25,9 @@ echo "npm $(npm --version)"
|
||||
|
||||
npm_dependencies=(
|
||||
"firebase-tools"
|
||||
"neovim"
|
||||
"typescript-language-server"
|
||||
"typescript"
|
||||
# "neovim"
|
||||
# "typescript-language-server"
|
||||
# "typescript"
|
||||
)
|
||||
|
||||
npm_dependencies=($(comm -13 <(printf "%s\n" "${npm_dependencies[@]}" | sort) <(npm list -g --depth=0 --parseable | awk -F'/' '{print $NF}' | sort)))
|
||||
|
||||
@@ -8,19 +8,19 @@
|
||||
|
||||
# skip if in WSL
|
||||
if [[ -n "$WSL_DISTRO_NAME" ]]; then
|
||||
echo -e "${GREY}Running in WSL${NC}"
|
||||
echo -e "${YELLOW}Running in WSL${NC}"
|
||||
export SKIP_DOCKER_CONFIG=1
|
||||
fi
|
||||
|
||||
# skip if in CODESPACES
|
||||
if [[ -n "$CODESPACES" ]]; then
|
||||
echo -e "${GREY}Running in GitHub Codespaces${NC}"
|
||||
echo -e "${YELLOW}Running in GitHub Codespaces${NC}"
|
||||
export SKIP_DOCKER_CONFIG=1
|
||||
fi
|
||||
|
||||
# skip on mac
|
||||
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
echo -e "${GREY}Running on macOS${NC}"
|
||||
echo -e "${YELLOW}Running on macOS${NC}"
|
||||
export SKIP_DOCKER_CONFIG=1
|
||||
fi
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
# Install terraform.
|
||||
#
|
||||
|
||||
if ! command -v "terraform" &>/dev/null; then
|
||||
if ! command -v terraform &>/dev/null; then
|
||||
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
|
||||
terraform_keyring_path="/usr/share/keyrings/hashicorp-archive-keyring.gpg"
|
||||
if [[ ! -f "$terraform_keyring_path" ]]; then
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
# Install neofetch.
|
||||
#
|
||||
|
||||
if ! command -v "neofetch" &>/dev/null; then
|
||||
if ! command -v neofetch &>/dev/null; then
|
||||
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
|
||||
sudo apt-get install -qq neofetch &>/dev/null
|
||||
elif [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
# skip if in CODESPACES
|
||||
if [[ -n "$CODESPACES" ]]; then
|
||||
echo -e "${GREY}Running in GitHub Codespaces${NC}"
|
||||
echo -e "${YELLOW}Running in GitHub Codespaces${NC}"
|
||||
export SKIP_CMATRIX_CONFIG=1
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user