diff options
| author | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2025-08-25 19:47:56 +0900 |
|---|---|---|
| committer | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2025-08-25 19:47:56 +0900 |
| commit | 4ffaa868822c4756d2e08ef0ea3f86aef92709e4 (patch) | |
| tree | a85ef973541443bb0b48839940064390a3527ebb | |
| parent | 0928ad5c974e98579cf73c42692b0cd82fd4b0cd (diff) | |
modified static/macprogs.csv, modified static/thesiah-mac.sh
| -rw-r--r-- | static/macprogs.csv | 1 | ||||
| -rwxr-xr-x | static/thesiah-mac.sh | 53 |
2 files changed, 23 insertions, 31 deletions
diff --git a/static/macprogs.csv b/static/macprogs.csv index ee760b6..1483044 100644 --- a/static/macprogs.csv +++ b/static/macprogs.csv @@ -80,6 +80,7 @@ C,qutebrowser,is a vim-like browser. ,sesh,is a smart session manager for tmux. C,soundsource,is a sound and audio controller. ,stats,is a system monitor for the menu bar. +,stow,organizes software neatly under a single directory tree. ,sketchybar,"creates a highly flexible,customizable,fast,and powerful status bar." ,task,is a feature-rich console based todo list manager. ,taskopen,is a tool for taking notes and open urls with taskwarrior. diff --git a/static/thesiah-mac.sh b/static/thesiah-mac.sh index 608812f..d6cd90c 100755 --- a/static/thesiah-mac.sh +++ b/static/thesiah-mac.sh @@ -6,9 +6,9 @@ ### VARIABLES ### -dotfilesrepo="https://github.com/TheSiahxyz/mac.git" -progsfile="https://raw.githubusercontent.com/thesiah/THESIAH/main/static/macprogs.csv" -repobranch="main" +dotfilesrepo="https://github.com/TheSiahxyz/.dotfiles.git" +progsfile="thesiah.xyz/macprogs.csv" +repobranch="master" ### FUNCTIONS ### @@ -25,18 +25,6 @@ error() { exit 1 } -# Get user's password -getuserandpass() { - # Prompts user for new username an password. - pass1=$(echo "Enter a password for that user:") - pass2=$(echo "Retype password:") - while ! [ "$pass1" = "$pass2" ]; do - unset pass2 - pass1=$(echo "Passwords do not match.\\n\\nEnter password again:") - pass2=$(echo "Retype password:") - done -} - # Install Homebrew brewinstall() { if ! command -v brew &>/dev/null; then @@ -49,21 +37,21 @@ brewinstall() { # Install Homebrew packages installpkg() { - if brew list "$1" &>/dev/null; then + if brew list "$1" | grep "$1" &>/dev/null; then echo "$1 is already installed." else echo "Installing $1..." - $pass1 | brew install "$1" || error "Failed to install $1." + brew install "$1" || error "Failed to install $1." fi } # Install Homebrew Cask applications caskinstall() { - if brew list --cask "$1" &>/dev/null; then + if brew list --cask "$1" | grep "$1" &>/dev/null; then echo "$1 is already installed." else echo "Installing $1..." - $pass1 | brew install --cask "$1" || error "Failed to install $1." + brew install --cask "$1" || error "Failed to install $1." fi } @@ -79,14 +67,14 @@ pipinstall() { # Install Homebrew Tap packages tapinstall() { # Extract the repository and package name - local repo=$(echo "$1" | cut -d'/' -f1) - local pkg=$(echo "$1" | cut -d'/' -f2) + repo=$(echo "$1" | cut -d'/' -f1) + pkg=$(echo "$1" | cut -d'/' -f2) echo "Adding tap: $repo" brew tap "$repo" || error "Failed to tap $repo." echo "Installing package: $pkg from tap" - $pass1 | brew install "$pkg" || error "Failed to install $pkg from tap." + brew install "$pkg" || error "Failed to install $pkg from tap." } # Install mac apps with mas @@ -106,7 +94,7 @@ masinstall() { # Clone and setup dotfiles putgitrepo() { notify "Installation" "Downloading and installing config files..." - local dir=$(mktemp -d) + dir=$(mktemp -d) if [ ! -d "$2" ]; then mkdir -p "$2" fi @@ -133,13 +121,10 @@ installationloop() { finalize() { # Farewell echo "All done!" - echo "Congrats! Provided there were no hidden errors, the script completed successfully and all the programs and configuration files should be in place.\\n\\nTo run the new graphical environment, log out and log back in as your new user, then run the command \"startx\" to start the graphical environment (it will start automatically in tty1).\\n\\n.t Soomin" + echo "Congrats! Provided there were no hidden errors, the script completed successfully and all the programs and configuration files should be in place.\\n\\n.t Soomin" } ### Main Installation Process ### -# Store user's password -getuserandpass - # Ensure Homebrew is installed brewinstall || error "Failed to install Homebrew." @@ -152,11 +137,17 @@ installationloop # Setup Dotfiles putgitrepo "$dotfilesrepo" "$HOME" "$repobranch" && mv "$HOME/$(echo "$dotfilesrepo" | sed 's|.*/\([^/]*\)\.git|\1|')" "$HOME/.dotfiles" -# Clean up any unwanted files from the dotfiles repo -rm -rf "$HOME/.git" "$HOME/README.md" "$HOME/LICENSE" "$HOME/FUNDING.yml" "/tmp/programs.csv" - # Sync profile -ln -sf ~/.dotfiles/shell/profile ~/.zprofile +ln -sf ~/.dotfiles/mac/.config/shell/profile ~/.zprofile +ln -sf ~/.dotfiles/mac/.config/bash/bash_profile ~/.bash_profile +ln -sf ~/.dotfiles/mac/.config/bash/bashrc ~/.bashrc + +cd ~/.dotfiles + +stow --no-folding -S global +stow --no-folding -S mac + +cd - # Final finalize |
