fix: linting

This commit is contained in:
Andrejus
2021-06-28 00:37:17 +01:00
parent 9cea0005ee
commit 27c3473936
12 changed files with 20 additions and 31 deletions

View File

@@ -1,10 +1,2 @@
# Load .profile, containing login, non-bash related initializations.
[ -f "$HOME/.profile" ] && source "$HOME/.profile"
# Load .bashrc, containing non-login related bash initializations.
[ -f "$HOME/.bashrc" ] && source "$HOME/.bashrc"
# References:
# https://unix.stackexchange.com/questions/192521/loading-profile-from-bash-profile-or-not-using-bash-profile-at-all
# https://www.stefaanlippens.net/my_bashrc_aliases_profile_and_other_stuff/

View File

@@ -1,3 +0,0 @@
# Load nvm bash dependency
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion

View File

@@ -27,6 +27,7 @@ export DOTFILES=${DOTFILES:-"$HOME/.dotfiles"}
# nvm
export NVM_DIR=${NVM_DIR:-"$HOME/.nvm"}
mkdir -p "$NVM_DIR"
[ -f "$NVM_DIR/nvm.sh" ] && source "$NVM_DIR/nvm.sh"
# node (default v14)

View File

@@ -79,8 +79,8 @@ function stow_package {
rm -f $HOME/.profile
target=$HOME
;;
*)
;;
*) ;;
esac
echo "Stowing $ABS_DIR/files/$name to $target"

View File

@@ -1,9 +1,9 @@
#!/usr/bin/env bash
fish --version
current_shell=`grep "^$USER" /etc/passwd`
current_shell=$(grep "^$USER" /etc/passwd)
current_shell=${current_shell##*:}
fish_shell=`command -v fish`
fish_shell=$(command -v fish)
if [[ "$current_shell" != "$fish_shell" ]]; then
sudo usermod --shell "$fish_shell" "$USER"
fi

View File

@@ -9,8 +9,7 @@ if ! bin_in_path "pyenv"; then
bash
fi
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
eval "$(pyenv init --path)"
pyenv update

View File

@@ -11,6 +11,6 @@ pip3 install --upgrade pip
python3 --version
pip3 --version
for dep in `jq -r ".pip_dependencies[]" $CONFIG`; do
for dep in $(jq -r ".pip_dependencies[]" $CONFIG); do
pip3 install --upgrade $dep
done

View File

@@ -5,7 +5,7 @@ if ! bin_in_path "nvm"; then
"bash"
fi
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/nvm.sh" ] && source "$NVM_DIR/nvm.sh"
nvm --version
nvm alias default lts/fermium

View File

@@ -1,7 +1,7 @@
#!/usr/bin/env bash
yarn --version
for dep in `jq -r ".node_dependencies[]" $CONFIG`; do
for dep in $(jq -r ".node_dependencies[]" $CONFIG); do
yarn global add $dep
yarn global upgrade $dep
done

View File

@@ -3,12 +3,12 @@
# Install neovim from unstable debian repo
if ! bin_in_path "nvim"; then
curl -fsSL "https://ftp-master.debian.org/keys/archive-key-10.asc" | sudo apt-key add -
echo "deb http://deb.debian.org/debian unstable main" \
| sudo tee /etc/apt/sources.list.d/unstable.list
echo "deb http://deb.debian.org/debian unstable main" |
sudo tee /etc/apt/sources.list.d/unstable.list
echo "Package: neovim
Pin: release a=unstable
Pin-Priority: 900" \
| sudo tee /etc/apt/preferences.d/neovim
Pin-Priority: 900" |
sudo tee /etc/apt/preferences.d/neovim
update
install neovim
fi

View File

@@ -9,5 +9,5 @@ docker build . \
docker run \
-v "$(pwd)"/logs:/home/test-user/.dotfiles/logs \
dotfiles:$tag
dotfiles:$tag \
/bin/bash

View File

@@ -23,7 +23,7 @@ else
fi
# Download and untar repo
tmp_dir=`mktemp -d`
tmp_dir=$(mktemp -d)
tmp_dest="$tmp_dir/dotfiles.tar.gz"
wget "https://github.com/$author/$repository/archive/$branch.tar.gz" -qO $tmp_dest
tar -C $tmp_dir -zxf $tmp_dest