update for arm linux
This commit is contained in:
1
aliases
1
aliases
@@ -19,6 +19,7 @@ alias gcc="gcc -g"
|
|||||||
alias hora='date "+%H:%M:%S"'
|
alias hora='date "+%H:%M:%S"'
|
||||||
alias wthr='curl wttr.in/san_luis_obispo'
|
alias wthr='curl wttr.in/san_luis_obispo'
|
||||||
alias nf='cl; neofetch; shownetinfo && lab && batt'
|
alias nf='cl; neofetch; shownetinfo && lab && batt'
|
||||||
|
alias servers='python3 /Users/smparkin/Development/server_stats/servers.py'
|
||||||
|
|
||||||
# School
|
# School
|
||||||
alias 429='cd /Users/smparkin/Library/Mobile\ Documents/com\~apple\~CloudDocs/CalPoly/2020-21/Winter21/CSC429'
|
alias 429='cd /Users/smparkin/Library/Mobile\ Documents/com\~apple\~CloudDocs/CalPoly/2020-21/Winter21/CSC429'
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ function shownetinfo() {
|
|||||||
NET=""
|
NET=""
|
||||||
|
|
||||||
if [ "$OSTYPE" = "Linux" ]; then
|
if [ "$OSTYPE" = "Linux" ]; then
|
||||||
IP=$(ifconfig | grep -v "127.0.0.1" | grep "inet " | head -1 | cut -d " " -f10)
|
IP=$(ip addr show | grep -v "127.0.0.1" | grep "inet " | head -1 | cut -d " " -f6 | cut -d "/" -f1)
|
||||||
NET=$(ip route | grep default | cut -d " " -f3)
|
NET=$(ip route | grep default | cut -d " " -f3)
|
||||||
elif [ "$OSTYPE" = "Darwin" ]; then
|
elif [ "$OSTYPE" = "Darwin" ]; then
|
||||||
NET=$(system_profiler SPNetworkDataType | grep "Router:" | cut -c 19-30 | head -1)
|
NET=$(system_profiler SPNetworkDataType | grep "Router:" | cut -c 19-30 | head -1)
|
||||||
|
|||||||
2
zshrc
2
zshrc
@@ -40,6 +40,7 @@ elif [ "$OSTYPE" = "Darwin" ]; then
|
|||||||
batt
|
batt
|
||||||
fi
|
fi
|
||||||
# configure homebrew for arm and x86
|
# configure homebrew for arm and x86
|
||||||
|
if [ "$OSTYPE" = "Darwin" ]; then
|
||||||
ARCH=$(uname -m)
|
ARCH=$(uname -m)
|
||||||
if [ "$ARCH" = "arm64" ]; then
|
if [ "$ARCH" = "arm64" ]; then
|
||||||
export PATH="/opt/homebrew/bin:$PATH"
|
export PATH="/opt/homebrew/bin:$PATH"
|
||||||
@@ -47,3 +48,4 @@ if [ "$ARCH" = "arm64" ]; then
|
|||||||
elif [ "$ARCH" = "x86_64" ]; then
|
elif [ "$ARCH" = "x86_64" ]; then
|
||||||
export PATH="/usr/local/bin:$PATH"
|
export PATH="/usr/local/bin:$PATH"
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user