Skip to content

Commit

Permalink
Merge pull request #193 from st3v3nhunt/better-deno-install
Browse files Browse the repository at this point in the history
better deno install
  • Loading branch information
st3v3nhunt authored Jun 22, 2020
2 parents d7d1d0d + e44dbc9 commit 2ea3d19
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 31 deletions.
8 changes: 5 additions & 3 deletions dotfiles/.shared-shell-setup
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ export NVM_LAZY_LOAD=true
# Source zsh-nvm
source ~/.zsh-nvm/zsh-nvm.plugin.zsh

# Set Deno options
export DENO_INSTALL="/home/shunt/.deno"
export PATH="$DENO_INSTALL/bin:$PATH"
# Add Deno to PATH
if [[ "$OSTYPE" != "darwin*" ]]; then
export DENO_INSTALL="/home/shunt/.deno"
export PATH="$DENO_INSTALL/bin:$PATH"
fi
12 changes: 6 additions & 6 deletions dotfiles/.zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,9 @@ export PATH="$PATH:~/.dotnet/tools"
# alias ohmyzsh="mate ~/.oh-my-zsh"

# PERSONAL SETUP
. ~/.aliases
. ~/.functions
. ~/.shared-shell-setup
source ~/.aliases
source ~/.functions
source ~/.shared-shell-setup

# -i case-insensitive search unless search string contains uppercase letters
# -R color
Expand Down Expand Up @@ -154,13 +154,13 @@ source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh

# tabtab source for packages
# uninstall by removing these lines
[[ -f ~/.config/tabtab/__tabtab.zsh ]] && . ~/.config/tabtab/__tabtab.zsh || true
[[ -f ~/.config/tabtab/__tabtab.zsh ]] && source ~/.config/tabtab/__tabtab.zsh || true
# zprof

# The next line updates PATH for the Google Cloud SDK.
if [ -f '/home/shunt/google-cloud-sdk/path.zsh.inc' ]; then . '/home/shunt/google-cloud-sdk/path.zsh.inc'; fi
if [ -f '/home/shunt/google-cloud-sdk/path.zsh.inc' ]; then source '/home/shunt/google-cloud-sdk/path.zsh.inc'; fi

# The next line enables shell command completion for gcloud.
if [ -f '/home/shunt/google-cloud-sdk/completion.zsh.inc' ]; then . '/home/shunt/google-cloud-sdk/completion.zsh.inc'; fi
if [ -f '/home/shunt/google-cloud-sdk/completion.zsh.inc' ]; then source '/home/shunt/google-cloud-sdk/completion.zsh.inc'; fi

export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"
1 change: 1 addition & 0 deletions scripts/install-mac-stuff.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ printf "${GREEN}Finished installing Karabiner-Elements configuration...${NC}\\n"
echo "If there are problems with karabiner settings not being loaded try turning on the setting for 'system default configuration'"

brews=(
deno
docker-machine-driver-hyperkit
hyperkit
reattach-to-user-namespace
Expand Down
22 changes: 0 additions & 22 deletions scripts/install-node-stuff.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,3 @@ echo "Installing global npm packages (serverless, snyk, yarn)..."
npm install -g serverless
npm install -g snyk
npm install -g yarn

echo "Installing deno and autocompletion..."
curl -fsSL https://deno.land/x/install/install.sh | sh

if [[ -n "$ZSH" ]]; then
# shellcheck disable=1090
. ~/.zshrc
mkdir ~/.oh-my-zsh/custom/plugins/deno
deno completions zsh > ~/.oh-my-zsh/custom/plugins/deno/_deno
# shellcheck disable=1090
. ~/.zshrc
else
# shellcheck disable=1090
. ~/.bashrc
if [[ -n "$WSL_DISTRO_NAME" ]]; then
deno completions bash > /home/linuxbrew/.linuxbrew/etc/bash_completion.d/deno.bash
else
deno completions bash > /usr/local/etc/bash_completion.d/deno.bash
fi
# shellcheck disable=1090
. ~/.bashrc
fi
19 changes: 19 additions & 0 deletions scripts/install-wsl-stuff.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,25 @@ sudo apt-get install build-essential curl file git zsh vim.gtk
sudo apt-get install apt-transport-https
sudo apt-get install dotnet-sdk-3.1

echo "Installing Deno..."
curl -fsSL https://deno.land/x/install/install.sh | sh

echo "Installing Deno autocompletion..."
if [[ -n "$ZSH" ]]; then
# shellcheck disable=1090
source ~/.zshrc
mkdir ~/.oh-my-zsh/custom/plugins/deno
deno completions zsh > ~/.oh-my-zsh/custom/plugins/deno/_deno
# shellcheck disable=1090
source ~/.zshrc
else
# shellcheck disable=1090
source ~/.bashrc
deno completions bash > /home/linuxbrew/.linuxbrew/etc/bash_completion.d/deno.bash
# shellcheck disable=1090
source ~/.bashrc
fi

REPO_DIR="$( cd "$( dirname "$(dirname "${BASH_SOURCE[0]}" )" )" && pwd )"

echo "Copying 'wsl.conf' into /etc/. Password will be required"
Expand Down

0 comments on commit 2ea3d19

Please sign in to comment.