dotfiles/zsh/platform.zsh

15 lines
327 B
Bash
Raw Normal View History

export PLATFORM="unkown"
2022-02-27 14:00:11 +00:00
2021-07-17 18:24:07 +01:00
osname=$(uname -s)
2022-02-27 14:00:11 +00:00
cputype=$(uname -m)
2021-07-17 18:24:07 +01:00
if [[ "$osname" == 'Linux' ]]; then
export PLATFORM="linux"
2021-07-17 18:24:07 +01:00
elif [[ "$osname" == 'Darwin' ]]; then
if [[ "$cputpye" == 'x86_64' ]]; then
export PLATFORM="osx"
elif [[ "$cputype" == 'arm64' ]]; then
export PLATFORM="osx-m1"
fi
fi