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. # Load .profile, containing login, non-bash related initializations.
[ -f "$HOME/.profile" ] && source "$HOME/.profile" [ -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 # nvm
export NVM_DIR=${NVM_DIR:-"$HOME/.nvm"} export NVM_DIR=${NVM_DIR:-"$HOME/.nvm"}
mkdir -p "$NVM_DIR"
[ -f "$NVM_DIR/nvm.sh" ] && source "$NVM_DIR/nvm.sh" [ -f "$NVM_DIR/nvm.sh" ] && source "$NVM_DIR/nvm.sh"
# node (default v14) # node (default v14)

View File

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

View File

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

View File

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

View File

@@ -11,6 +11,6 @@ pip3 install --upgrade pip
python3 --version python3 --version
pip3 --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 pip3 install --upgrade $dep
done done

View File

@@ -5,7 +5,7 @@ if ! bin_in_path "nvm"; then
"bash" "bash"
fi 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 --version
nvm alias default lts/fermium nvm alias default lts/fermium

View File

@@ -1,7 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
yarn --version 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 add $dep
yarn global upgrade $dep yarn global upgrade $dep
done done

View File

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

View File

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

View File

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