diff --git a/zsh/aliases.zsh b/zsh/aliases.zsh index 4704c64..3a01e73 100644 --- a/zsh/aliases.zsh +++ b/zsh/aliases.zsh @@ -14,8 +14,10 @@ alias gb="git rev-parse --abbrev-ref HEAD" alias irc="ssh jmb -t '. ~/.zshrc; tmux attach -t irc'" test $PLATFORM = 'linux' && alias ls="ls -F --color=always" test $PLATFORM = 'osx' && alias ls="ls -FG" +test $PLATFORM = 'osx-m1' && alias ls="ls -FG" test $PLATFORM = 'linux' && alias pipup="pip freeze --local | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 sudo pip install -U" test $PLATFORM = 'osx' && alias pipup="pip3 freeze --local | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 pip3 install -U" +test $PLATFORM = 'osx-m1' && alias pipup="pip3 freeze --local | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 pip3 install -U" alias rtor="tmux attach -t rtor" alias startace="acestreamengine --client-console --upload-limit 0 --download-limit 0" alias up="sudo pacman -Syu" diff --git a/zsh/platform.zsh b/zsh/platform.zsh index d8104fb..e22a5ef 100644 --- a/zsh/platform.zsh +++ b/zsh/platform.zsh @@ -1,7 +1,12 @@ export PLATFORM="unkown" -unamestr=$(uname -s) -if [[ "$unamestr" == 'Linux' ]]; then +osname=$(uname -s) +cputpye=£(uname -m) +if [[ "$osname" == 'Linux' ]]; then export PLATFORM="linux" -elif [[ "$unamestr" == 'Darwin' ]]; then - export PLATFORM="osx" -fi \ No newline at end of file +elif [[ "$osname" == 'Darwin' ]]; then + if [[ "$cputpye" == 'x86_64' ]]; then + export PLATFORM="osx" + elif [[ "$cputype" == 'arm64' ]]; then + export PLATFORM="osx-m1" + fi +fi