From 4b9610dfb9af8c7363b89d90ee265322acb0f911 Mon Sep 17 00:00:00 2001 From: Fabian Ising Date: Fri, 2 Jun 2023 15:51:31 +0200 Subject: [PATCH] [ZSH] More ARM fixes --- update_mac.sh | 2 +- zsh/.virtual_env_config.zsh_mac.example | 11 +++++++++-- zsh/.zshrc | 13 +++++++++---- 3 files changed, 19 insertions(+), 7 deletions(-) diff --git a/update_mac.sh b/update_mac.sh index cf2ac03..b0c73a7 100755 --- a/update_mac.sh +++ b/update_mac.sh @@ -4,7 +4,7 @@ ARCH=`uname -m` if [[ $ARCH == "arm64" ]]; then PREFIX="/opt/homebrew/" else - PREFIX="/usr/local" + PREFIX="/usr/local/" fi function set_permissions { diff --git a/zsh/.virtual_env_config.zsh_mac.example b/zsh/.virtual_env_config.zsh_mac.example index 8c52612..46a7d10 100644 --- a/zsh/.virtual_env_config.zsh_mac.example +++ b/zsh/.virtual_env_config.zsh_mac.example @@ -1,4 +1,11 @@ +ARCH=`uname -m` +if [[ $ARCH == "arm64" ]]; then + PREFIX="/opt/homebrew" +else + PREFIX="/usr/local" +fi + export WORKON_HOME=~/python-envs -export VIRTUALENVWRAPPER_VIRTUALENV=/usr/local/bin/virtualenv +export VIRTUALENVWRAPPER_VIRTUALENV=$PREFIX/bin/virtualenv mkdir -p $WORKON_HOME -source /opt/homebrew/bin/virtualenvwrapper.sh +source $PREFIX/bin/virtualenvwrapper.sh diff --git a/zsh/.zshrc b/zsh/.zshrc index 9b10aaa..dd0327a 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -1,10 +1,15 @@ # Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc. # Initialization code that may require console input (password prompts, [y/n] # confirmations, etc.) must go above this block; everything else may go below. -#if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then - #source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" -#fi -export PATH="$HOME/.local/bin:/opt/homebrew/bin:$PATH" + +ARCH=`uname -m` +if [[ $ARCH == "arm64" ]]; then + PREFIX="/opt/homebrew" +else + PREFIX="/usr/local" +fi + +export PATH="$HOME/.local/bin:$PREFIX/bin:$PATH" [[ -f ~/.zsh/.powerline_config ]] && source ~/.zsh/.powerline_config [[ -f ~/.zsh/.user_config ]] && source ~/.zsh/.user_config