chore: mac specific fixes

pull/7/head
Adam Veldhousen 2021-10-25 15:09:26 -05:00
parent 16a5456fd7
commit 73e9243bec
No known key found for this signature in database
GPG Key ID: 2659715981640EFB
4 changed files with 12 additions and 9 deletions

View File

@ -1,15 +1,18 @@
#!/bin/env bash #!/bin/env bash
export LINUX_BREW_PATH="/home/linuxbrew/.linuxbrew"; export LINUX_BREW_PATH="/home/linuxbrew/.linuxbrew";
export MAC_BREW_PATH="/usr/local/Homebrew";
if ! [[ -d "${LINUX_BREW_PATH}" ]]; then if [[ ! -d "${LINUX_BREW_PATH}" && ! -d "${MAC_BREW_PATH}" ]]; then
echo "Installing brew";
curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh -o /tmp/brew_install.sh; curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh -o /tmp/brew_install.sh;
chmod +x /tmp/brew_install.sh; chmod +x /tmp/brew_install.sh;
/tmp/brew_install.sh; /tmp/brew_install.sh;
rm -rf /tmp/brew_install.sh; rm -rf /tmp/brew_install.sh;
fi fi
[[ -f "${LINUX_BREW_PATH}/bin/brew" ]] && eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"; [[ -f "${LINUX_BREW_PATH}/bin/brew" ]] && eval "$(${LINUX_BREW_PATH}/bin/brew shellenv)";
[[ -f "${MAC_BREW_PATH}/bin/brew" ]] && eval "$(${MAC_BREW_PATH}/bin/brew shellenv)";
[[ -f "$(brew --prefix bash-completion)/etc/bash_completion" ]] || brew install bash-completion [[ -f "$(brew --prefix bash-completion)/etc/bash_completion" ]] || brew install bash-completion

View File

@ -96,7 +96,7 @@ function targz() {
# Usage: `json '{"foo":42}'` or `echo '{"foo":42}' | json` # Usage: `json '{"foo":42}'` or `echo '{"foo":42}' | json`
function json() { function json() {
if [ -t 0 ]; then # argument if [ -t 0 ]; then # argument
python -mjson.tool <<< "$*" | pygmentize -l javascript; python -mjson.tool < "$*" | pygmentize -l javascript;
else # pipe else # pipe
python -mjson.tool | pygmentize -l javascript; python -mjson.tool | pygmentize -l javascript;
fi; fi;
@ -120,7 +120,7 @@ function gitio() {
} }
# list files # list files
alias ll='ls -hGla --color' alias ll='ls -hGla'
#git #git
alias gs='git status' alias gs='git status'

View File

@ -9,7 +9,7 @@ set nocompatible
"color schemes "color schemes
"colorscheme torte "colorscheme torte
"colorscheme jellybeans colorscheme jellybeans
"colorscheme molokai "colorscheme molokai
"colorscheme wombat256i "colorscheme wombat256i
"colorscheme dragon-energy "colorscheme dragon-energy