fix: brew installation

main
James 2023-10-02 10:52:50 +01:00
parent 02b93dd4f9
commit 68662a1575
Signed by: james
SSH Key Fingerprint: SHA256:7tOVvkg3eVqn4GbEInHoSkEG96Cvqgvwx+VHUD9begc
4 changed files with 36 additions and 13 deletions

View File

@ -1,6 +1,7 @@
#!/bin/sh #!/bin/sh
# Save the current working directory # Save the current working directory
DIR=$(pwd) DIR=$(pwd)
SCRIPTS_DIR="$DIR/scripts"
# Go to the home directory # Go to the home directory
cd ~ cd ~
@ -31,14 +32,35 @@ echo
echo "Done linking dotfiles." echo "Done linking dotfiles."
# End Symlinks # End Symlinks
# Set up macOS defaults # Check if the "scripts" directory exists
./scripts/set-mac-defaults.sh if [ ! -d "$SCRIPTS_DIR" ]; then
echo "Error: The 'scripts' directory does not exist."
exit 1
fi
# Install Homebrew, packages and applications # List of scripts to be executed (replace these with your script names)
./scripts/install-homebrew.sh SCRIPTS=("set-mac-defaults.sh" "install-homebrew.sh" "install-oh-my-zsh.sh" "install-volta.sh")
# Install Oh My Zsh # Change the working directory to the "scripts" directory
./scripts/install-oh-my-zsh.sh cd "$SCRIPTS_DIR" || exit 1
# Install Volta # Iterate over the scripts and execute them
./scripts/install-volta.sh for script in "${SCRIPTS[@]}"; do
# Check if the script file exists
if [ ! -f "$script" ]; then
echo "Warning: Script '$script' not found in the 'scripts' directory."
continue
fi
# Execute the script
echo "Executing '$script'..."
chmod +x "$script" # Ensure the script is executable
"./$script" # Execute the script
echo "Finished executing '$script'."
done
# Return to the original directory (optional)
cd - > /dev/null
echo "new Compooper successful! :)"

View File

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/bash
#
# Homebrew # Homebrew installation
# Check for Homebrew # Check for Homebrew
if test ! $(which brew) if test ! $(which brew)
@ -10,7 +10,7 @@ then
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
fi fi
brew update > /dev/null brew update-reset
echo "Installing Homebrew packages..." echo "Installing Homebrew packages..."
echo echo

View File

@ -1,4 +1,4 @@
#!/bin/sh #!/bin/bash
# Install oh-my-zsh # Install oh-my-zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

View File

@ -1,4 +1,5 @@
#!/bin/bash #!/bin/bash
echo "Installing Volta..." echo "Installing Volta..."
echo echo
curl https://get.volta.sh | bash curl https://get.volta.sh | bash