add terraform, aws tools, update git pull, update how PATH .profile is loaded
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,4 +1,5 @@
|
|||||||
# install
|
# install
|
||||||
|
tmp
|
||||||
.dotlock
|
.dotlock
|
||||||
*.deb
|
*.deb
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,13 @@
|
|||||||
if [ -z "$PROFILE_LOCK" ]; then
|
if [ -z "$PROFILE_LOCK" ]; then
|
||||||
|
echo "acquiring profile lock"
|
||||||
export PROFILE_LOCK=1
|
export PROFILE_LOCK=1
|
||||||
|
|
||||||
# set PATH so it includes user's private bin if it exists
|
# set PATH so it includes user's private bin if it exists
|
||||||
if [ -d "$HOME/bin" ]; then
|
if [ -d "$HOME/bin" ]; then
|
||||||
PATH="$HOME/bin:$PATH"
|
export PATH="$HOME/bin:$PATH"
|
||||||
|
fi
|
||||||
|
if [ -d "$HOME/.local/bin" ]; then
|
||||||
|
export PATH="$HOME/.local/bin:$PATH"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# config
|
# config
|
||||||
@@ -19,32 +23,40 @@ if [ -z "$PROFILE_LOCK" ]; then
|
|||||||
# workspace
|
# workspace
|
||||||
if [ -z "$WORKSPACE" ]; then
|
if [ -z "$WORKSPACE" ]; then
|
||||||
export WORKSPACE="$HOME/workspace"
|
export WORKSPACE="$HOME/workspace"
|
||||||
|
mkdir -p "$WORKSPACE"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# .local
|
|
||||||
export PATH="$HOME/.local/bin:$PATH"
|
|
||||||
|
|
||||||
# pyenv
|
# pyenv
|
||||||
export PYENV_ROOT="$HOME/.pyenv"
|
export PYENV_ROOT="$HOME/.pyenv"
|
||||||
export PATH="$PYENV_ROOT/bin:$PATH"
|
if [ -d "$PYENV_ROOT" ]; then
|
||||||
export PATH="$PYENV_ROOT/shims:$PATH"
|
export PATH="$PYENV_ROOT/bin:$PATH"
|
||||||
[ -x "$(command -v pyenv)" ] && eval "$(pyenv init -)"
|
export PATH="$PYENV_ROOT/shims:$PATH"
|
||||||
|
[ -x "$(command -v pyenv)" ] && eval "$(pyenv init -)"
|
||||||
|
fi
|
||||||
|
|
||||||
# poetry
|
# poetry
|
||||||
export POETRY_ROOT="$HOME/.poetry"
|
export POETRY_ROOT="$HOME/.poetry"
|
||||||
export PATH="$POETRY_ROOT/bin:$PATH"
|
if [ -d "$POETRY_ROOT" ]; then
|
||||||
|
export PATH="$POETRY_ROOT/bin:$PATH"
|
||||||
|
fi
|
||||||
|
|
||||||
# nvm
|
# nvm
|
||||||
export NVM_DIR="$XDG_CONFIG_HOME/nvm"
|
export NVM_DIR="$XDG_CONFIG_HOME/nvm"
|
||||||
export PATH="$NVM_DIR/bin:$PATH"
|
if [ -d "$NVM_DIR" ]; then
|
||||||
# [ -s "$NVM_DIR/nvm.sh" ] && source "$NVM_DIR/nvm.sh"
|
export PATH="$NVM_DIR/bin:$PATH"
|
||||||
|
# [ -s "$NVM_DIR/nvm.sh" ] && source "$NVM_DIR/nvm.sh"
|
||||||
|
fi
|
||||||
|
|
||||||
# yarn
|
# yarn
|
||||||
export YARN_DIR="$HOME/.yarn"
|
export YARN_DIR="$HOME/.yarn"
|
||||||
if ! [ -x "$(command -v yarn)" ]; then
|
if [ -d "$YARN_DIR" ]; then
|
||||||
export PATH="$YARN_DIR/bin:$PATH"
|
export PATH="$YARN_DIR/bin:$PATH"
|
||||||
else
|
|
||||||
export PATH="$(yarn global bin):$PATH"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# if ! [ -x "$(command -v yarn)" ]; then
|
||||||
|
# export PATH="$YARN_DIR/bin:$PATH"
|
||||||
|
# else
|
||||||
|
# export PATH="$(yarn global bin):$PATH"
|
||||||
|
# fi
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -2,32 +2,32 @@
|
|||||||
# Cross-shell
|
# Cross-shell
|
||||||
# ---------------------------------------------------------------------------- #
|
# ---------------------------------------------------------------------------- #
|
||||||
|
|
||||||
# config
|
# # config
|
||||||
set XDG_CONFIG_HOME $HOME/.config
|
# set XDG_CONFIG_HOME $HOME/.config
|
||||||
|
|
||||||
# workspace
|
# # workspace
|
||||||
set WORKSPACE $HOME/workspace
|
# set WORKSPACE $HOME/workspace
|
||||||
|
|
||||||
# .local
|
# # .local
|
||||||
set -x PATH $HOME/.local/bin $PATH
|
# set -x PATH $HOME/.local/bin $PATH
|
||||||
|
|
||||||
# pyenv
|
# # pyenv
|
||||||
set PYENV_ROOT $HOME/.pyenv
|
# set PYENV_ROOT $HOME/.pyenv
|
||||||
set -x PATH $PYENV_ROOT/bin $PATH
|
# set -x PATH $PYENV_ROOT/bin $PATH
|
||||||
set -x PATH $PYENV_ROOT/shims $PATH
|
# set -x PATH $PYENV_ROOT/shims $PATH
|
||||||
type -q pyenv && pyenv init - | source
|
# type -q pyenv && pyenv init - | source
|
||||||
|
|
||||||
# poetry
|
# # poetry
|
||||||
set POETRY_ROOT $HOME/.poetry
|
# set POETRY_ROOT $HOME/.poetry
|
||||||
set -x PATH $POETRY_ROOT/bin $PATH
|
# set -x PATH $POETRY_ROOT/bin $PATH
|
||||||
|
|
||||||
# nvm
|
# # nvm
|
||||||
set NVM_ROOT $HOME/.nvm
|
# set NVM_ROOT $HOME/.nvm
|
||||||
set -x PATH $NVM_ROOT/bin $PATH
|
# set -x PATH $NVM_ROOT/bin $PATH
|
||||||
|
|
||||||
# yarn
|
# # yarn
|
||||||
set YARN_DIR $HOME/.yarn
|
# set YARN_DIR $HOME/.yarn
|
||||||
set -x PATH $YARN_DIR/bin $PATH
|
# set -x PATH $YARN_DIR/bin $PATH
|
||||||
|
|
||||||
# ---------------------------------------------------------------------------- #
|
# ---------------------------------------------------------------------------- #
|
||||||
# Fish specific
|
# Fish specific
|
||||||
|
|||||||
@@ -1,13 +1,12 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# apt clean, update, upgrade
|
|
||||||
clean
|
clean
|
||||||
update
|
update
|
||||||
upgrade
|
upgrade
|
||||||
|
echo "apt cleaned, updated, upgraded"
|
||||||
|
|
||||||
# Install list of packages in 00-apt-pkglist
|
|
||||||
package_list_file="$install_dir/00-apt-pkglist"
|
package_list_file="$install_dir/00-apt-pkglist"
|
||||||
install_file "$package_list_file"
|
install_file "$package_list_file"
|
||||||
|
echo "list of dependencies installed"
|
||||||
|
|
||||||
# Log OS version
|
|
||||||
cat /etc/os-release
|
cat /etc/os-release
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# bash dotfiles are symlinked
|
|
||||||
bash_source="$dotfiles_dir/bash"
|
bash_source="$dotfiles_dir/bash"
|
||||||
bash_target="$HOME"
|
bash_target="$HOME"
|
||||||
link_folder "$bash_source" "$bash_target"
|
link_folder "$bash_source" "$bash_target"
|
||||||
echo "bash dotfiles are linked"
|
echo "bash dotfiles are linked"
|
||||||
|
|
||||||
bash --version
|
bash --version
|
||||||
|
|||||||
@@ -1,44 +1,49 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# fish shell is installed
|
|
||||||
if not_installed "fish"; then
|
if not_installed "fish"; then
|
||||||
echo "Installing fish..."
|
echo "installing fish..."
|
||||||
|
|
||||||
add_ppa "fish-shell/release-3"
|
add_ppa "fish-shell/release-3"
|
||||||
update
|
update
|
||||||
install fish
|
install fish
|
||||||
|
|
||||||
fi
|
fi
|
||||||
echo "fish is installed"
|
echo "fish is installed"
|
||||||
fish --version
|
|
||||||
|
|
||||||
# fish shell is default login shell
|
# current_shell="$(getent passwd $USER | cut -d: -f7)"
|
||||||
current_shell="$(getent passwd $USER | cut -d: -f7)"
|
# fish_path="$(which fish)"
|
||||||
fish_path="$(which fish)"
|
# if [ "$current_shell" != "$fish_path" ]; then
|
||||||
if [ "$current_shell" != "$fish_path" ]; then
|
# echo "setting fish as default, current shell was $current_shell"
|
||||||
echo "setting fish as default, current shell was $current_shell"
|
# sudo chsh -s "$fish_path" "$USER"
|
||||||
|
# sudo usermod -s "$fish_path" "$USER"
|
||||||
|
# fi
|
||||||
|
# echo "fish is default login shell"
|
||||||
|
|
||||||
sudo chsh -s "$fish_path" "$USER"
|
|
||||||
sudo usermod -s "$fish_path" "$USER"
|
|
||||||
fi
|
|
||||||
echo "fish is default login shell"
|
|
||||||
|
|
||||||
# fish dotfiles are symlinked
|
|
||||||
fish_source="$dotfiles_dir/fish"
|
fish_source="$dotfiles_dir/fish"
|
||||||
fish_target="$XDG_CONFIG_HOME/fish"
|
fish_target="$XDG_CONFIG_HOME/fish"
|
||||||
link_folder "$fish_source" "$fish_target"
|
link_folder "$fish_source" "$fish_target"
|
||||||
echo "fish dotfiles linked"
|
echo "fish dotfiles linked"
|
||||||
|
|
||||||
# fisher is installed
|
fish --version
|
||||||
|
|
||||||
fisher_location="$XDG_CONFIG_HOME/fish/functions/fisher.fish"
|
fisher_location="$XDG_CONFIG_HOME/fish/functions/fisher.fish"
|
||||||
if ! [ -f "$fisher_location" ]; then
|
if ! [ -f "$fisher_location" ]; then
|
||||||
|
|
||||||
echo "Installing fisher..."
|
echo "Installing fisher..."
|
||||||
|
|
||||||
# Install fisher
|
|
||||||
curl https://git.io/fisher --create-dirs -sLo "$fisher_location"
|
curl https://git.io/fisher --create-dirs -sLo "$fisher_location"
|
||||||
|
|
||||||
fi
|
fi
|
||||||
printf "fisher is installed, updating...\n"
|
echo "fisher is installed, updating..."
|
||||||
fish -c "fisher"
|
fish -c "fisher"
|
||||||
|
|
||||||
fish -c "fisher --version"
|
fish -c "fisher --version"
|
||||||
|
|
||||||
|
if not_installed "fishlogin"; then
|
||||||
|
echo "setting up fishlogin..."
|
||||||
|
mkdir -p ~/bin
|
||||||
|
target="$HOME/bin/fishlogin"
|
||||||
|
tee -a $target << END
|
||||||
|
#!/bin/bash -l
|
||||||
|
exec -l fish "\$@"
|
||||||
|
END
|
||||||
|
sudo chmod +x $target
|
||||||
|
echo $target | sudo tee -a /etc/shells
|
||||||
|
sudo usermod -s $target $USER
|
||||||
|
fi
|
||||||
|
|||||||
@@ -17,5 +17,7 @@ if not_installed "pyenv"; then
|
|||||||
|
|
||||||
fi
|
fi
|
||||||
echo "pyenv is installed, upgrading..."
|
echo "pyenv is installed, upgrading..."
|
||||||
git --git-dir="$PYENV_ROOT/.git" pull
|
git --git-dir="$PYENV_ROOT/.git" fetch -q
|
||||||
|
git --git-dir="$PYENV_ROOT/.git" rebase -q --autostash FETCH_HEAD
|
||||||
|
|
||||||
pyenv --version
|
pyenv --version
|
||||||
|
|||||||
@@ -13,7 +13,9 @@ if not_installed "nvm"; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
printf "nvm is installed, upgrading...\n"
|
printf "nvm is installed, upgrading...\n"
|
||||||
git --git-dir="$NVM_DIR/.git" pull
|
git --git-dir="$NVM_DIR/.git" fetch -q
|
||||||
|
git --git-dir="$NVM_DIR/.git" rebase -q --autostash FETCH_HEAD
|
||||||
|
|
||||||
nvm --version
|
nvm --version
|
||||||
node --version
|
node --version
|
||||||
npm --version
|
npm --version
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ if not_installed "keybase"; then
|
|||||||
printf "Installing keybase...\n"
|
printf "Installing keybase...\n"
|
||||||
|
|
||||||
curl --remote-name https://prerelease.keybase.io/keybase_amd64.deb
|
curl --remote-name https://prerelease.keybase.io/keybase_amd64.deb
|
||||||
install keybase_amd64.deb
|
install ./keybase_amd64.deb
|
||||||
rm keybase_amd64.deb
|
rm ./keybase_amd64.deb
|
||||||
|
|
||||||
fi
|
fi
|
||||||
printf "keybase is installed\n"
|
printf "keybase is installed\n"
|
||||||
|
|||||||
16
install/33-aws.sh
Executable file
16
install/33-aws.sh
Executable file
@@ -0,0 +1,16 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
|
||||||
|
unzip awscliv2.zip -d "$dotfiles_dir/tmp"
|
||||||
|
rm awscliv2.zip
|
||||||
|
|
||||||
|
if not_installed "aws"; then
|
||||||
|
echo "Installing awscli..."
|
||||||
|
sudo ./tmp/aws/install
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "awscli is installed, upgrading..."
|
||||||
|
sudo ./tmp/aws/install --update
|
||||||
|
aws --version
|
||||||
|
|
||||||
|
rm -rf ./tmp/aws
|
||||||
14
install/34-terraform.sh
Executable file
14
install/34-terraform.sh
Executable file
@@ -0,0 +1,14 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
if not_installed "terraform"; then
|
||||||
|
echo "Installing terraform..."
|
||||||
|
wget https://releases.hashicorp.com/terraform/0.12.24/terraform_0.12.24_linux_amd64.zip
|
||||||
|
unzip terraform_0.12.24_linux_amd64.zip -d "$dotfiles_dir/tmp"
|
||||||
|
rm terraform_0.12.24_linux_amd64.zip
|
||||||
|
mkdir -p ~/.local/bin
|
||||||
|
mv "$dotfiles_dir/tmp/terraform" ~/.local/bin
|
||||||
|
rm "$dotfiles_dir/tmp/terraform"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "terraform is installed"
|
||||||
|
terraform --version
|
||||||
Reference in New Issue
Block a user