mirror of
https://github.com/jakejarvis/dotfiles.git
synced 2025-04-26 03:45:21 -04:00
support codespaces
This commit is contained in:
parent
52a48280e7
commit
0dc947fc72
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!"
|
||||
|
||||
# Ask for the administrator password upfront
|
||||
sudo -v
|
||||
|
||||
# Clone this repo if we haven't already
|
||||
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
|
||||
git submodule update --init --recursive
|
||||
|
||||
if [ "$(uname)" == "Darwin" ]; then
|
||||
if [ "$(uname)" = "Darwin" ]; then
|
||||
# shellcheck disable=SC1090,SC1091
|
||||
source "$YOU_ARE_HERE/macos/macos.sh"
|
||||
elif [ "$CODESPACES" = "true" ]; then
|
||||
# shellcheck disable=SC1090,SC1091
|
||||
source "$YOU_ARE_HERE/codespaces/codespaces.sh"
|
||||
else
|
||||
echo ""
|
||||
echo "This isn't a Mac, so we're all done here!"
|
||||
|
@ -7,6 +7,9 @@ if test ! "$(uname)" = "Darwin"; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Ask for the administrator password upfront
|
||||
sudo -v
|
||||
|
||||
# Make sure macOS is fully up to date before doing anything
|
||||
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)"
|
||||
fi
|
||||
|
||||
# fix zplug
|
||||
ln -s "$(brew --prefix)/opt/zplug" ~/.zplug
|
||||
|
||||
# Disable analytics
|
||||
# https://docs.brew.sh/Analytics
|
||||
brew analytics off
|
||||
|
@ -47,7 +47,7 @@ compinit -C
|
||||
# Load everything!
|
||||
source $ZSH/oh-my-zsh.sh
|
||||
|
||||
export ZPLUG_HOME=/opt/homebrew/opt/zplug
|
||||
export ZPLUG_HOME=~/.zplug
|
||||
source $ZPLUG_HOME/init.zsh
|
||||
|
||||
# Fix slow paste problem w/ zsh-syntax-highlighting plugin
|
||||
|
@ -1,3 +1,4 @@
|
||||
if [ "$(uname)" = "Darwin" ]; then
|
||||
# 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"
|
||||
|
||||
@ -55,6 +56,7 @@ if command -v pyenv 1>/dev/null 2>&1; then
|
||||
eval "$(pyenv init --path)"
|
||||
eval "$(pyenv init -)"
|
||||
fi
|
||||
fi
|
||||
|
||||
# volta
|
||||
export VOLTA_HOME="$HOME/.volta"
|
||||
|
Loading…
x
Reference in New Issue
Block a user