Skip to content

Commit 850e96e

Browse files
committed
Fixes for linting
1 parent 5396e6e commit 850e96e

File tree

5 files changed

+24
-20
lines changed

5 files changed

+24
-20
lines changed

home/dot-zshrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,3 +86,7 @@ set -o vi
8686

8787
# Add RVM to PATH for scripting. Make sure this is the last PATH variable change.
8888
export PATH="$PATH:$HOME/.rvm/bin"
89+
90+
export NVM_DIR="$HOME/.nvm"
91+
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
92+
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion

scripts/base_install.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ function base_install() {
33

44
if [[ "$system" == "arch" ]]; then
55
INFO "Setting up an arch based system"
6-
if [ $(which yay) == "" ]; then
6+
if [ "$(which yay)" == "" ]; then
77
INFO "Setting up yay..."
88
[ ! -d /tmp/yay ] && git clone https://aur.archlinux.org/yay.git /tmp/yay
9-
cd /tmp/yay
9+
cd /tmp/yay || exit 1
1010
makepkg -si --noconfirm
11-
cd -
11+
cd - || exit 1
1212
else
1313
INFO "yay already installed"
1414
fi
@@ -61,12 +61,12 @@ function base_install() {
6161
python3-setuptools
6262

6363
INFO "Installing NEOVIM..."
64-
$alt_install $NEOVIM
64+
$alt_install "$NEOVIM"
6565

6666
INFO "Installing LazyVim Dependencies"
6767
rust_install
6868
INFO "Installing go"
69-
$alt_install $GO
69+
$alt_install "$GO"
7070
INFO "Installing Lazy Dependencies"
7171
$pkg_install \
7272
nodejs \
@@ -87,7 +87,7 @@ function base_install() {
8787
$pkg_install \
8888
ca-certificates \
8989
gnupg
90-
if [ $system == "arch" ]; then
90+
if [ "$system" == "arch" ]; then
9191
DOCKER_PACKAGES="containerd docker docker-compose"
9292
else
9393
$pkg_install \
@@ -103,7 +103,7 @@ function base_install() {
103103
DOCKER_PACKAGES="containerd.io docker-ce docker-ce-cli docker-buildx-plugin docker-compose-plugin"
104104
fi
105105

106-
$pkg_install $DOCKER_PACKAGES
106+
$pkg_install "$DOCKER_PACKAGES"
107107

108108
sudo usermod -a -G docker "$USER"
109109
if [ ! "$CI" ]; then

scripts/devcontainer.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ sudo chsh -s /usr/bin/zsh
3131

3232
# ensure that .config is owned by the current user
3333
if [[ -d $HOME/.config && ! $(stat -c "%U" "$HOME/.config") == "$(whoami)" ]]; then
34-
sudo chown $(id -u):$(id -g) "$HOME/.config"
34+
sudo chown "$(id -u)":"$(id -g)" "$HOME/.config"
3535
fi
3636

3737
# create links to dotfiles

scripts/main.sh

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ apt_install \
2424
# git clone [email protected]:erichlf/dotfiles.git
2525
git submodule update --init --recursive
2626

27-
sudo usermod -s $(which zsh) $(whoami)
27+
sudo usermod -s "$(which zsh)" "$(whoami)"
2828

2929
cmd=(
3030
dialog
@@ -77,7 +77,7 @@ function base_sys() {
7777
signal-desktop \
7878
slack
7979

80-
if [ $(which 1password) == "" ]; then
80+
if [ "$(which 1password)" == "" ]; then
8181
INFO "Installing 1password"
8282
mkdir -p /tmp/1password
8383
cd /tmp/1password
@@ -87,7 +87,7 @@ function base_sys() {
8787
rm -rf /tmp/1password
8888
fi
8989

90-
if [ $(which vivaldi) == "" ]; then
90+
if [ "$(which vivaldi)" == "" ]; then
9191
INFO "Installing Vivaldi"
9292
mkdir -p /tmp/vivaldi
9393
cd /tmp/vivaldi
@@ -137,20 +137,20 @@ function havoc() {
137137
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
138138
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
139139

140-
if [ ! -d $HOME/.local/balena ]; then
140+
if [ ! -d "$HOME/.local/balena" ]; then
141141
INFO "Installing balena"
142-
mkdir -p $HOME/.local
142+
mkdir -p "$HOME/.local"
143143
mkdir -p /tmp/balena
144144
cd /tmp/balena
145145
RELEASE=v22.1.1
146146
BALENA="balena-cli-$RELEASE-linux-x64-standalone.tar.gz"
147147
wget https://github.com/balena-io/balena-cli/releases/download/$RELEASE/$BALENA
148148
tar xzvf $BALENA
149-
mv balena $HOME/.local/
149+
mv balena "$HOME/.local/"
150150
rm -rf /tmp/balena
151151
fi
152152

153-
if [ $(which aws) == "" ]; then
153+
if [ "$(which aws)" == "" ]; then
154154
INFO "Installing AWS"
155155
mkdir -p /tmp/aws
156156
cd /tmp/aws
@@ -182,7 +182,7 @@ function havoc() {
182182
apt_update
183183
apt_install tailscale
184184

185-
if [ $(which foxglove) == "" ]; then
185+
if [ "$(which foxglove)" == "" ]; then
186186
INFO "Install foxglove"
187187
mkdir -p /tmp/foxglove
188188
cd /tmp/foxglove
@@ -195,9 +195,9 @@ function havoc() {
195195
INFO "Installing wireshark"
196196
apt_install wireshark
197197

198-
if [ $(which QGroundControl) == "" ]; then
198+
if [ "$(which QGroundControl)" == "" ]; then
199199
INFO "Installing QGroundControl"
200-
sudo usermod -a -G dialout $USER
200+
sudo usermod -a -G dialout "$USER"
201201
sudo apt-get remove modemmanager -y
202202
apt_install \
203203
gstreamer1.0-gl \

scripts/nas.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ DOTFILES_DIR=$(pwd)
44

55
set -e
66

7-
cd $(dirname $0)/..
7+
cd "$(dirname "$0")/.."
88
DOTFILES_DIR=$(pwd)
99

1010
source "$DOTFILES_DIR/scripts/utils.sh"
@@ -23,7 +23,7 @@ pac_install \
2323
# git clone [email protected]:erichlf/dotfiles.git
2424
git submodule update --init --recursive
2525

26-
sudo usermod -s $(which zsh) $(whoami)
26+
sudo usermod -s "$(which zsh)" "$(whoami)"
2727

2828
pac_update
2929

0 commit comments

Comments
 (0)