mirror of
https://github.com/jakejarvis/dotfiles.git
synced 2025-11-04 22:10:09 -05:00
support codespaces
This commit is contained in:
17
codespaces/codespaces.sh
Executable file
17
codespaces/codespaces.sh
Executable file
@@ -0,0 +1,17 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
USERNAME=$(whoami)
|
||||||
|
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get -y install man
|
||||||
|
|
||||||
|
# set shell to zsh
|
||||||
|
sudo chsh -s /usr/bin/zsh "$USERNAME"
|
||||||
|
|
||||||
|
# re-find bearings
|
||||||
|
ln -sf "$YOU_ARE_HERE" ~/.dotfiles
|
||||||
|
|
||||||
|
# install zplug
|
||||||
|
export ZPLUG_HOME=~/.zplug
|
||||||
|
# curl -sL --proto-redir -all,https https://raw.githubusercontent.com/zplug/installer/master/installer.zsh | zsh
|
||||||
|
git clone https://github.com/zplug/zplug $ZPLUG_HOME
|
||||||
@@ -7,9 +7,6 @@ YOU_ARE_HERE="$(realpath "$(dirname "${BASH_SOURCE[0]}")")"
|
|||||||
|
|
||||||
echo "👋 Deep breaths, everything will (probably) be fine!"
|
echo "👋 Deep breaths, everything will (probably) be fine!"
|
||||||
|
|
||||||
# Ask for the administrator password upfront
|
|
||||||
sudo -v
|
|
||||||
|
|
||||||
# Clone this repo if we haven't already
|
# Clone this repo if we haven't already
|
||||||
git clone --recurse-submodules https://github.com/jakejarvis/dotfiles.git "$YOU_ARE_HERE" || true
|
git clone --recurse-submodules https://github.com/jakejarvis/dotfiles.git "$YOU_ARE_HERE" || true
|
||||||
|
|
||||||
@@ -31,9 +28,12 @@ fi
|
|||||||
# Use Git submodules to get OMZ plugins
|
# Use Git submodules to get OMZ plugins
|
||||||
git submodule update --init --recursive
|
git submodule update --init --recursive
|
||||||
|
|
||||||
if [ "$(uname)" == "Darwin" ]; then
|
if [ "$(uname)" = "Darwin" ]; then
|
||||||
# shellcheck disable=SC1090,SC1091
|
# shellcheck disable=SC1090,SC1091
|
||||||
source "$YOU_ARE_HERE/macos/macos.sh"
|
source "$YOU_ARE_HERE/macos/macos.sh"
|
||||||
|
elif [ "$CODESPACES" = "true" ]; then
|
||||||
|
# shellcheck disable=SC1090,SC1091
|
||||||
|
source "$YOU_ARE_HERE/codespaces/codespaces.sh"
|
||||||
else
|
else
|
||||||
echo ""
|
echo ""
|
||||||
echo "This isn't a Mac, so we're all done here!"
|
echo "This isn't a Mac, so we're all done here!"
|
||||||
|
|||||||
@@ -7,6 +7,9 @@ if test ! "$(uname)" = "Darwin"; then
|
|||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Ask for the administrator password upfront
|
||||||
|
sudo -v
|
||||||
|
|
||||||
# Make sure macOS is fully up to date before doing anything
|
# Make sure macOS is fully up to date before doing anything
|
||||||
sudo softwareupdate --install --all
|
sudo softwareupdate --install --all
|
||||||
|
|
||||||
@@ -25,6 +28,9 @@ if test ! "$(which brew)"; then
|
|||||||
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
|
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# fix zplug
|
||||||
|
ln -s "$(brew --prefix)/opt/zplug" ~/.zplug
|
||||||
|
|
||||||
# Disable analytics
|
# Disable analytics
|
||||||
# https://docs.brew.sh/Analytics
|
# https://docs.brew.sh/Analytics
|
||||||
brew analytics off
|
brew analytics off
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ compinit -C
|
|||||||
# Load everything!
|
# Load everything!
|
||||||
source $ZSH/oh-my-zsh.sh
|
source $ZSH/oh-my-zsh.sh
|
||||||
|
|
||||||
export ZPLUG_HOME=/opt/homebrew/opt/zplug
|
export ZPLUG_HOME=~/.zplug
|
||||||
source $ZPLUG_HOME/init.zsh
|
source $ZPLUG_HOME/init.zsh
|
||||||
|
|
||||||
# Fix slow paste problem w/ zsh-syntax-highlighting plugin
|
# Fix slow paste problem w/ zsh-syntax-highlighting plugin
|
||||||
|
|||||||
92
zsh/path.zsh
92
zsh/path.zsh
@@ -1,59 +1,61 @@
|
|||||||
# Default paths
|
if [ "$(uname)" = "Darwin" ]; then
|
||||||
export PATH="$HOME/bin:/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:$PATH"
|
# Default paths
|
||||||
|
export PATH="$HOME/bin:/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:$PATH"
|
||||||
|
|
||||||
# homebrew
|
# homebrew
|
||||||
export HOMEBREW_PREFIX="/opt/homebrew";
|
export HOMEBREW_PREFIX="/opt/homebrew";
|
||||||
export HOMEBREW_CELLAR="/opt/homebrew/Cellar";
|
export HOMEBREW_CELLAR="/opt/homebrew/Cellar";
|
||||||
export HOMEBREW_REPOSITORY="/opt/homebrew";
|
export HOMEBREW_REPOSITORY="/opt/homebrew";
|
||||||
export PATH="/opt/homebrew/bin:/opt/homebrew/sbin${PATH+:$PATH}";
|
export PATH="/opt/homebrew/bin:/opt/homebrew/sbin${PATH+:$PATH}";
|
||||||
export MANPATH="/opt/homebrew/share/man${MANPATH+:$MANPATH}:";
|
export MANPATH="/opt/homebrew/share/man${MANPATH+:$MANPATH}:";
|
||||||
export INFOPATH="/opt/homebrew/share/info:${INFOPATH:-}";
|
export INFOPATH="/opt/homebrew/share/info:${INFOPATH:-}";
|
||||||
|
|
||||||
# Go
|
# Go
|
||||||
export GOPATH="$HOME/golang"
|
export GOPATH="$HOME/golang"
|
||||||
#export GOROOT="/usr/local/opt/go/libexec"
|
#export GOROOT="/usr/local/opt/go/libexec"
|
||||||
export PATH="$GOPATH/bin:$PATH"
|
export PATH="$GOPATH/bin:$PATH"
|
||||||
#export PATH="$GOROOT/bin:$PATH"
|
#export PATH="$GOROOT/bin:$PATH"
|
||||||
|
|
||||||
# Ruby
|
# Ruby
|
||||||
export PATH="$HOME/.gem/ruby/3.0.0/bin:$PATH"
|
export PATH="$HOME/.gem/ruby/3.0.0/bin:$PATH"
|
||||||
export RUBY_HOME="$HOMEBREW_PREFIX/opt/ruby/bin"
|
export RUBY_HOME="$HOMEBREW_PREFIX/opt/ruby/bin"
|
||||||
export GEM_PATH="$HOMEBREW_PREFIX/lib/ruby/gems/3.0.0/bin"
|
export GEM_PATH="$HOMEBREW_PREFIX/lib/ruby/gems/3.0.0/bin"
|
||||||
export PATH="$RUBY_HOME:$PATH"
|
export PATH="$RUBY_HOME:$PATH"
|
||||||
export PATH="$GEM_PATH:$PATH"
|
export PATH="$GEM_PATH:$PATH"
|
||||||
|
|
||||||
# rbenv
|
# rbenv
|
||||||
export RUBY_CONFIGURE_OPTS="--with-openssl-dir=$(brew --prefix openssl@1.1) --with-readline-dir=$(brew --prefix readline) --with-libyaml-dir=$(brew --prefix libyaml)"
|
export RUBY_CONFIGURE_OPTS="--with-openssl-dir=$(brew --prefix openssl@1.1) --with-readline-dir=$(brew --prefix readline) --with-libyaml-dir=$(brew --prefix libyaml)"
|
||||||
if command -v rbenv 1>/dev/null 2>&1; then
|
if command -v rbenv 1>/dev/null 2>&1; then
|
||||||
eval "$(rbenv init -)"
|
eval "$(rbenv init -)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Python
|
# Python
|
||||||
export PATH="$HOME/Library/Python/3.9/bin:$PATH"
|
export PATH="$HOME/Library/Python/3.9/bin:$PATH"
|
||||||
|
|
||||||
# openjdk
|
# openjdk
|
||||||
export PATH="$HOMEBREW_PREFIX/opt/openjdk/bin:$PATH"
|
export PATH="$HOMEBREW_PREFIX/opt/openjdk/bin:$PATH"
|
||||||
|
|
||||||
# Metasploit
|
# Metasploit
|
||||||
export PATH="/opt/metasploit-framework/bin:$PATH"
|
export PATH="/opt/metasploit-framework/bin:$PATH"
|
||||||
|
|
||||||
# curl
|
# curl
|
||||||
export PATH="$HOMEBREW_PREFIX/opt/curl/bin:$PATH"
|
export PATH="$HOMEBREW_PREFIX/opt/curl/bin:$PATH"
|
||||||
|
|
||||||
# Rust/Cargo
|
# Rust/Cargo
|
||||||
export PATH="$HOME/.cargo/bin:$PATH"
|
export PATH="$HOME/.cargo/bin:$PATH"
|
||||||
|
|
||||||
# misc.
|
# misc.
|
||||||
export PATH="$HOMEBREW_PREFIX/opt/make/libexec/gnubin:$PATH"
|
export PATH="$HOMEBREW_PREFIX/opt/make/libexec/gnubin:$PATH"
|
||||||
export PATH="$HOMEBREW_PREFIX/opt/whois/bin:$PATH"
|
export PATH="$HOMEBREW_PREFIX/opt/whois/bin:$PATH"
|
||||||
export PATH="$HOMEBREW_PREFIX/opt/jpeg-turbo/bin:$PATH"
|
export PATH="$HOMEBREW_PREFIX/opt/jpeg-turbo/bin:$PATH"
|
||||||
|
|
||||||
# pyenv
|
# pyenv
|
||||||
export PYENV_ROOT="$HOME/.pyenv"
|
export PYENV_ROOT="$HOME/.pyenv"
|
||||||
export PATH="$PYENV_ROOT/bin:$PATH"
|
export PATH="$PYENV_ROOT/bin:$PATH"
|
||||||
if command -v pyenv 1>/dev/null 2>&1; then
|
if command -v pyenv 1>/dev/null 2>&1; then
|
||||||
eval "$(pyenv init --path)"
|
eval "$(pyenv init --path)"
|
||||||
eval "$(pyenv init -)"
|
eval "$(pyenv init -)"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# volta
|
# volta
|
||||||
|
|||||||
Reference in New Issue
Block a user