Added setup scripts

This commit is contained in:
Vasili Svirydau
2021-03-23 16:26:57 -07:00
parent 86ccd065a2
commit 4744842ce6
4 changed files with 21 additions and 1 deletions

View File

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

6
setup.d/10-shellcheck.sh Executable file
View File

@@ -0,0 +1,6 @@
#!/bin/bash
if ! command -v shellcheck > /dev/null; then
sudo apt update > /dev/null && sudo apt install shellcheck > /dev/null;
echo "Installed Shellcheck"
fi

9
setup.d/10-starship.sh Executable file
View File

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

View File

@@ -39,6 +39,9 @@ find . -maxdepth 1 -type f -printf "%f\0" | while IFS= read -r -d $'\0' P; do
chmod -R o-rwx,g-rwx "$target"
done
for f in $DOTFILES/setup.d/*.sh; do source "$f"; done
unset f;
(
echo "for f in \"$DOTFILES/bash.d/*.sh\"; do source \"\$f\"; done"
echo "unset f"