chore: mac specific fixes
parent
16a5456fd7
commit
73e9243bec
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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'
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue