Created
March 14, 2023 22:57
-
-
Save ggrumbley/1c70db35eb62eb2628abed290ae0c897 to your computer and use it in GitHub Desktop.
SteamOS Env Setup Script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Exist if any command returns with non-zero exit status fail. | |
set -e | |
# Get current dir (so run this script from anywhere) | |
export DOTFILES_DIR | |
DOTFILES_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |
echo "Update dotfiles..." | |
[ -d "$DOTFILES_DIR/.git" ] && git --work-tree="$DOTFILES_DIR" --git-dir="$DOTFILES_DIR/.git" pull origin master | |
function header() { | |
printf "\n======================================================================\n" | |
printf "$1" | |
printf "\n======================================================================\n" | |
} | |
# isCommand(command): | |
# returns 0 if command is not in path, 1 otherwise. | |
# Does not recongnize bash aliases | |
function isCommand() { | |
echo "Checking for \"$1\"..." | |
hash "$1" 2>/dev/null || command -v "$1" | |
} | |
header "Disable SteamOS Readonly Mode so we can get to work" | |
sudo steamos-readonly disable | |
header "Setup the Workbench" | |
mkdir -p -- ~/Workbench | |
header "Update Konsole Ownership" | |
chown -Rv deck /usr/share/konsole | |
header "Flatpak Install All the THINGS!" | |
flatpak install flathub -y \ | |
com.spotify.Client \ | |
com.visualstudio.code \ | |
com.slack.Slack \ | |
com.discordapp.Discord | |
header "Install Prezto" | |
if [ -d "$HOME/.zprezto" ]; then | |
echo "Prezto is already installed. Skipping..." | |
else | |
git clone --recursive https://github.com/sorin-ionescu/prezto.git "${ZDOTDIR:-$HOME}/.zprezto" | |
fi | |
header "Symlink all the THINGS!" | |
ln -sfv "$DOTFILES_DIR/.gitconfig" ~ | |
ln -sfv "$DOTFILES_DIR/.gitignore_global" ~ | |
ln -sfv "$DOTFILES_DIR/.npmrc" ~ | |
ln -sfv "$DOTFILES_DIR/.zpreztorc" ~ | |
ln -sfv "$DOTFILES_DIR/.zprofile" ~ | |
ln -sfv "$DOTFILES_DIR/.zshrc" ~ | |
ln -sfv "$DOTFILES_DIR/prompt_gary_setup" ~/.zprezto/modules/prompt/functions | |
header "Copy All the THINGS!" | |
cp -r "$DOTFILES_DIR/assets/." "$HOME/Pictures" | |
header "Install NVM" | |
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash | |
nvm install lts/hydrogen | |
header "Changing shell to ZSH" | |
if [ "$SHELL" == "/bin/bash" ]; then | |
header "Change Shell to ZSH" | |
sudo chsh -s "$(which zsh)" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment