mac changes

This commit is contained in:
Vasili Svirydau
2021-04-28 23:47:04 -07:00
parent cf075eb3cc
commit 6b2245dd16
6 changed files with 31 additions and 8 deletions

View File

@@ -1 +1,2 @@
#!/bin/bash
export DOTNET_CLI_TELEMETRY_OPTOUT=1

View File

@@ -1,5 +1,5 @@
#!/bin/bash
if test -x starship; then
if command -v starship > /dev/null; then
eval "$(starship init bash)"
fi

7
setup.d/01-brew.sh Normal file
View File

@@ -0,0 +1,7 @@
#!/bin/bash
if [[ "$OSTYPE" == "darwin"* ]]; then
if ! command -v brew > /dev/null; then
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
fi
fi

View File

@@ -0,0 +1,7 @@
#!/bin/bash
if [[ "$OSTYPE" == "darwin"* ]]; then
if ! command -v reattach-to-user-namespace > /dev/null; then
brew install reattach-to-user-namespace
fi
fi

View File

@@ -1,6 +1,18 @@
#!/bin/bash
if ! command -v shellcheck > /dev/null; then
sudo apt update > /dev/null && sudo apt install shellcheck > /dev/null;
echo "Installed Shellcheck"
did_install=0
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
sudo apt update > /dev/null && sudo apt install shellcheck > /dev/null;
did_install=1
elif [[ "$OSTYPE" == "darwin"* ]]; then
brew install shellcheck
did_install=1
fi
if [[ "$did_install" == 1 ]]; then
echo "Installed Shellcheck"
else
echo "Did NOT install Shellcheck"
fi
fi

View File

@@ -1,9 +1,5 @@
#!/bin/bash
if ! test -x /usr/local/bin/starship; then
if ! command -v /usr/local/bin/starship > /dev/null; then
curl -fsSL https://starship.rs/install.sh | bash
fi
if ! grep starship ~/.bashrc > /dev/null; then
echo "eval \"\$(starship init bash)\"" >> ~/.bashrc
fi