Skip to content

Commit

Permalink
Fix shellcheck
Browse files Browse the repository at this point in the history
  • Loading branch information
pathikrit committed Jun 15, 2023
1 parent b376c54 commit 11c7aac
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
run: ./install.sh

- name: Shellcheck
run: shellcheck -x *.sh
run: shellcheck *.sh

- name: Upgrade packages
run: ./install.sh
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ cd ~/Downloads
curl -sL https://raw.githubusercontent.com/pathikrit/mac-setup-script/master/defaults.sh | bash
curl -O https://raw.githubusercontent.com/pathikrit/mac-setup-script/master/install.sh
chmod +x install.sh
./install.sh >> install_log.txt
./install.sh
```
12 changes: 7 additions & 5 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ brews=(
bat
coreutils
colima
docker
docker
docker-compose
dfc # https://github.com/rolinh/dfc
exa # https://the.exa.website/
Expand Down Expand Up @@ -95,7 +95,7 @@ brews=(
postgresql
pgcli
pv # https://www.ivarch.com/programs/pv.shtml
python
python
osquery
ruby
shellcheck # https://www.shellcheck.net/
Expand Down Expand Up @@ -187,10 +187,10 @@ function install {

function brew_install_or_upgrade {
if brew ls --versions "$1" >/dev/null; then
if (brew outdated | grep "$1" > /dev/null); then
if (brew outdated | grep "$1" > /dev/null); then
echo "Upgrading already installed package $1 ..."
brew upgrade "$1"
else
else
echo "Latest $1 is already installed"
fi
else
Expand Down Expand Up @@ -219,6 +219,7 @@ export HOMEBREW_NO_AUTO_UPDATE=1

echo "Installing SDKs ..."
curl -s "https://get.sdkman.io" | bash
# shellcheck source=/dev/null
source "$HOME/.sdkman/bin/sdkman-init.sh"
for sdk in "${sdks[@]}"
do
Expand Down Expand Up @@ -250,7 +251,7 @@ if [[ -z "${CI}" ]]; then
ssh-keygen -t rsa -b 4096 -C ${git_email}
pbcopy < ~/.ssh/id_rsa.pub
open https://github.com/settings/ssh/new
fi
fi

echo "Setting up bash aliases ..."
echo "
Expand All @@ -260,6 +261,7 @@ alias cat=bat
" >> ~/.bash_profile
# https://github.com/twolfson/sexy-bash-prompt
echo "Setting up bash prompt ..."
# shellcheck source=/dev/null
(cd /tmp && ([[ -d sexy-bash-prompt ]] || git clone --depth 1 --config core.autocrlf=false https://github.com/twolfson/sexy-bash-prompt) && cd sexy-bash-prompt && make install) && source ~/.bashrc


Expand Down

0 comments on commit 11c7aac

Please sign in to comment.