update path, comment format, add java, firebase

This commit is contained in:
Andrejus
2020-03-30 22:02:56 +01:00
parent aa3d363ae6
commit 9ee05c94cf
17 changed files with 97 additions and 54 deletions

View File

@@ -1,37 +1,50 @@
# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ]; then
PATH="$HOME/bin:$PATH"
if [ -z "$PROFILE_LOCK" ]; then
export PROFILE_LOCK=1
# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ]; then
PATH="$HOME/bin:$PATH"
fi
# config
if [ -z "$XDG_DATA_HOME" ]; then
export XDG_DATA_HOME="$HOME/.local/share"
mkdir -p "$XDG_DATA_HOME"
fi
if [ -z "$XDG_CONFIG_HOME" ]; then
export XDG_CONFIG_HOME="$HOME/.config"
mkdir -p "$XDG_CONFIG_HOME"
fi
# workspace
if [ -z "$WORKSPACE" ]; then
export WORKSPACE="$HOME/workspace"
fi
# .local
export PATH="$HOME/.local/bin:$PATH"
# pyenv
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
export PATH="$PYENV_ROOT/shims:$PATH"
[ -x "$(command -v pyenv)" ] && eval "$(pyenv init -)"
# poetry
export POETRY_ROOT="$HOME/.poetry"
export PATH="$POETRY_ROOT/bin:$PATH"
# nvm
export NVM_DIR="$XDG_CONFIG_HOME/nvm"
export PATH="$NVM_DIR/bin:$PATH"
# [ -s "$NVM_DIR/nvm.sh" ] && source "$NVM_DIR/nvm.sh"
# yarn
export YARN_DIR="$HOME/.yarn"
if ! [ -x "$(command -v yarn)" ]; then
export PATH="$YARN_DIR/bin:$PATH"
else
export PATH="$(yarn global bin):$PATH"
fi
fi
# config
if [ -z "$XDG_DATA_HOME" ]; then
export XDG_DATA_HOME="$HOME/.local/share"
mkdir -p "$XDG_DATA_HOME"
fi
if [ -z "$XDG_CONFIG_HOME" ]; then
export XDG_CONFIG_HOME="$HOME/.config"
mkdir -p "$XDG_CONFIG_HOME"
fi
# workspace
if [ -z "$WORKSPACE" ]; then
export WORKSPACE="$HOME/workspace"
fi
# .local
export PATH="$HOME/.local/bin:$PATH"
# pyenv
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
export PATH="$PYENV_ROOT/shims:$PATH"
[ -x "$(command -v pyenv)" ] && eval "$(pyenv init -)"
# poetry
export POETRY_ROOT="$HOME/.poetry"
export PATH="$POETRY_ROOT/bin:$PATH"
# nvm
export NVM_DIR="$XDG_CONFIG_HOME/nvm"
export PATH="$NVM_DIR/bin:$PATH"
[ -s "$NVM_DIR/nvm.sh" ] && source "$NVM_DIR/nvm.sh"

View File

@@ -22,8 +22,12 @@ set POETRY_ROOT $HOME/.poetry
set -x PATH $POETRY_ROOT/bin $PATH
# nvm
# set NVM_ROOT $HOME/.nvm
# set -x PATH $NVM_ROOT/bin $PATH
set NVM_ROOT $HOME/.nvm
set -x PATH $NVM_ROOT/bin $PATH
# yarn
set YARN_DIR $HOME/.yarn
set -x PATH $YARN_DIR/bin $PATH
# ---------------------------------------------------------------------------- #
# Fish specific

View File

@@ -3,5 +3,4 @@ make
net-tools
openssh-client
openssh-server
screenfetch
software-properties-common

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env bash
# 1. ssh key exists
# ssh key exists
ssh_target="$HOME/.ssh"
ssh_key="$ssh_target/id_rsa"
ssh_pub="$ssh_key.pub"
@@ -10,7 +10,7 @@ if [ ! -f "$ssh_key" ]; then
fi
echo "ssh key exists"
# 2. ssh dotfiles are symlinked
# ssh dotfiles are symlinked
ssh_source="$dotfiles_dir/ssh"
link_folder "$ssh_source" "$ssh_target"
echo "ssh dotfiles are symlinked"

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env bash
# 1. git dotfiles are symlinked
# git dotfiles are symlinked
git_source="$dotfiles_dir/git"
git_target="$HOME"
link_folder "$git_source" "$git_target"

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env bash
# 1. pyenv is installed
# pyenv is installed
if not_installed "pyenv"; then
echo "Installing pyenv..."

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env bash
# 1. python3 and pip3 are installed
# python3 and pip3 are installed
if not_installed "pip3"; then
echo "Installing python3 and pip3..."

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env bash
# 1. poetry is installed
# poetry is installed
if not_installed "poetry"; then
printf "Installing poetry...\n"

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env bash
# 1. nvm is installed
# nvm is installed
if not_installed "nvm"; then
printf "Installing nvm...\n"

9
install/15-java.sh Executable file
View File

@@ -0,0 +1,9 @@
#!/usr/bin/env bash
if not_installed "java"; then
echo "Installing java..."
install default-jre
fi
echo "java is installed"
java --version

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env bash
# 1. docker is installed
# docker is installed
DOCKER_FOLDER="$HOME/.docker"
if not_installed "docker"; then
@@ -32,7 +32,7 @@ fi
printf "docker is installed\n"
docker --version
# 2. docker-compose if installed
# docker-compose if installed
if not_installed "docker-compose"; then
printf "Installing docker-compose...\n"
@@ -45,14 +45,14 @@ printf "docker-compose is installed, upgrading\n"
pip3 install --upgrade docker-compose
docker-compose --version
# 3. docker group exists
# docker group exists
readonly docker_group='docker'
if ! grep -q "$docker_group" /etc/group; then
sudo groupadd "$docker_group"
fi
printf "group '$docker_group' is created\n"
# 4. user is in docker group
# user is in docker group
if ! groups "$USER" | grep -q "\b$docker_group\b"; then
sudo usermod -aG docker "$USER"
fi

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env bash
# 1.keybase is installed
# keybase is installed
if not_installed "keybase"; then
printf "Installing keybase...\n"

10
install/32-firebase.sh Executable file
View File

@@ -0,0 +1,10 @@
#!/usr/bin/env bash
if not_installed "firebase"; then
echo "Installing firebase..."
run "https://firebase.tools" "bash"
fi
echo "firebase is installed, upgrading..."
curl -sL firebase.tools | upgrade=true bash
firebase --version

View File

@@ -1,4 +1,4 @@
#!/usr/bin/env bash
# post clean
echo "cleaning"
clean

10
install/99-screenfetch.sh Executable file
View File

@@ -0,0 +1,10 @@
#!/usr/bin/env bash
if not_installed "screenfetch"; then
echo "Installing screenfetch..."
install screenfetch
fi
echo "screenfetch is installed"
screenfetch --version
screenfetch

View File

@@ -1,2 +0,0 @@
#!/usr/bin/env bash
screenfetch