From 2f644336f584de46d88b1d9437bb6af38c483169 Mon Sep 17 00:00:00 2001 From: Andrejus Date: Mon, 25 Aug 2025 11:21:10 +0100 Subject: [PATCH] fix: arch setup --- script/install.d/11-python.sh | 8 +++-- script/install.d/20-docker.sh | 4 +-- script/install.d/22-azure.sh | 6 +--- script/install.d/80-neofetch.sh | 2 +- script/install_config.json | 60 --------------------------------- tests/test_binaries.py | 1 - 6 files changed, 9 insertions(+), 72 deletions(-) delete mode 100644 script/install_config.json diff --git a/script/install.d/11-python.sh b/script/install.d/11-python.sh index 6fc3eff..8f87b20 100644 --- a/script/install.d/11-python.sh +++ b/script/install.d/11-python.sh @@ -7,10 +7,12 @@ export PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring -if ! command -v python &>/dev/null; then - pyenv install 3.12.1 - pyenv global 3.12.1 +local version="3.13.7" + +if ! pyenv versions --bare | grep -q "$version"; then + pyenv install "$version" fi +pyenv global "$version" pip3 install --quiet --upgrade --user pip python3 --version diff --git a/script/install.d/20-docker.sh b/script/install.d/20-docker.sh index 4cc79df..06f2fd9 100644 --- a/script/install.d/20-docker.sh +++ b/script/install.d/20-docker.sh @@ -48,12 +48,12 @@ if [[ -z "$SKIP_DOCKER_CONFIG" ]]; then readonly docker_group="docker" if ! grep -q "$docker_group" /etc/group; then - echo "Adding docker group" + log_info "Adding docker group" sudo groupadd "$docker_group" fi if ! groups "$USER" | grep -q "\b$docker_group\b"; then - echo "Adding user to docker group" + log_info "Adding user to docker group" sudo usermod -aG docker "$USER" fi elif [[ "$OSTYPE" == "darwin"* ]]; then diff --git a/script/install.d/22-azure.sh b/script/install.d/22-azure.sh index 9081289..aa4ff70 100644 --- a/script/install.d/22-azure.sh +++ b/script/install.d/22-azure.sh @@ -11,11 +11,7 @@ if ! command -v az &>/dev/null; then # https://docs.microsoft.com/en-us/cli/azure/install-azure-cli-linux?pivots=apt curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash elif command -v pacman >/dev/null 2>&1; then - if command -v yay >/dev/null 2>&1; then - yay -S --noconfirm azure-cli-bin || log_warn "AUR install failed for azure-cli-bin" - else - log_warn "Skipping Azure CLI: no AUR helper found" - fi + sudo pacman -S --noconfirm azure-cli &>/dev/null else log_warn "Skipping Azure CLI install: no supported package manager found" fi diff --git a/script/install.d/80-neofetch.sh b/script/install.d/80-neofetch.sh index c0c33e9..1f8d997 100644 --- a/script/install.d/80-neofetch.sh +++ b/script/install.d/80-neofetch.sh @@ -10,7 +10,7 @@ if ! command -v neofetch &>/dev/null; then if command -v apt-get >/dev/null 2>&1; then sudo apt-get install -qq neofetch &>/dev/null elif command -v pacman >/dev/null 2>&1; then - sudo pacman -S --noconfirm neofetch &>/dev/null + yay -S --noconfirm neofetch &>/dev/null else log_warn "Skipping neofetch install: no supported package manager found" fi diff --git a/script/install_config.json b/script/install_config.json deleted file mode 100644 index 4b6099d..0000000 --- a/script/install_config.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "apt_repositories": [ - { - "key": "hashicorp", - "signingKey": "https://apt.releases.hashicorp.com/gpg", - "repository": "https://apt.releases.hashicorp.com", - "components": "bullseye main" - }, - { - "key": "yarn", - "signingKey": "https://dl.yarnpkg.com/debian/pubkey.gpg", - "repository": "https://dl.yarnpkg.com/debian", - "components": "stable main" - }, - { - "key": "google-cloud", - "signingKey": "https://packages.cloud.google.com/apt/doc/apt-key.gpg", - "repository": "https://packages.cloud.google.com/apt", - "components": "cloud-sdk main" - }, - { - "key": "docker", - "signingKey": "https://download.docker.com/linux/debian/gpg", - "repository": "https://download.docker.com/linux/debian", - "components": "bullseye stable" - } - ], - "apt_dependencies": [ - "apt-transport-https", - "ca-certificates", - "containerd.io", - "cowsay", - "default-jre", - "devscripts", - "docker-ce-cli", - "docker-ce", - "emacs", - "fd-find", - "figlet", - "fonts-nanum", - "fortune-mod", - "fzf", - "git", - "google-cloud-sdk", - "kubectl", - "lsb-release", - "make", - "net-tools", - "netcat-traditional", - "openssh-client", - "openssh-server", - "redis-tools", - "screenfetch", - "terraform-ls", - "terraform", - "tmux", - "unzip", - "yarn" - ] -} diff --git a/tests/test_binaries.py b/tests/test_binaries.py index 1f93b5c..50f4319 100644 --- a/tests/test_binaries.py +++ b/tests/test_binaries.py @@ -62,7 +62,6 @@ binaries: List[Text] = [ # langauge: js "node", "npm", - "yarn", ] binaries = [binary for binary in binaries if binary is not None]