fix: brew installation
							parent
							
								
									02b93dd4f9
								
							
						
					
					
						commit
						68662a1575
					
				
							
								
								
									
										38
									
								
								install.sh
								
								
								
								
							
							
						
						
									
										38
									
								
								install.sh
								
								
								
								
							| 
						 | 
				
			
			@ -1,6 +1,7 @@
 | 
			
		|||
#!/bin/sh
 | 
			
		||||
# Save the current working directory
 | 
			
		||||
DIR=$(pwd)
 | 
			
		||||
SCRIPTS_DIR="$DIR/scripts"
 | 
			
		||||
 | 
			
		||||
# Go to the home directory
 | 
			
		||||
cd ~
 | 
			
		||||
| 
						 | 
				
			
			@ -31,14 +32,35 @@ echo
 | 
			
		|||
echo "Done linking dotfiles."
 | 
			
		||||
# End Symlinks
 | 
			
		||||
 | 
			
		||||
# Set up macOS defaults
 | 
			
		||||
./scripts/set-mac-defaults.sh
 | 
			
		||||
# Check if the "scripts" directory exists
 | 
			
		||||
if [ ! -d "$SCRIPTS_DIR" ]; then
 | 
			
		||||
  echo "Error: The 'scripts' directory does not exist."
 | 
			
		||||
  exit 1
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
# Install Homebrew, packages and applications
 | 
			
		||||
./scripts/install-homebrew.sh
 | 
			
		||||
# List of scripts to be executed (replace these with your script names)
 | 
			
		||||
SCRIPTS=("set-mac-defaults.sh" "install-homebrew.sh" "install-oh-my-zsh.sh" "install-volta.sh")
 | 
			
		||||
 | 
			
		||||
# Install Oh My Zsh
 | 
			
		||||
./scripts/install-oh-my-zsh.sh
 | 
			
		||||
# Change the working directory to the "scripts" directory
 | 
			
		||||
cd "$SCRIPTS_DIR" || exit 1
 | 
			
		||||
 | 
			
		||||
# Install Volta
 | 
			
		||||
./scripts/install-volta.sh
 | 
			
		||||
# Iterate over the scripts and execute them
 | 
			
		||||
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! :)"
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,6 +1,6 @@
 | 
			
		|||
#!/bin/sh
 | 
			
		||||
#
 | 
			
		||||
# Homebrew
 | 
			
		||||
#!/bin/bash
 | 
			
		||||
 | 
			
		||||
# Homebrew installation
 | 
			
		||||
 | 
			
		||||
# Check for Homebrew
 | 
			
		||||
if test ! $(which brew)
 | 
			
		||||
| 
						 | 
				
			
			@ -10,7 +10,7 @@ then
 | 
			
		|||
  /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
brew update > /dev/null
 | 
			
		||||
brew update-reset
 | 
			
		||||
 | 
			
		||||
echo "Installing Homebrew packages..."
 | 
			
		||||
echo
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,4 +1,4 @@
 | 
			
		|||
#!/bin/sh
 | 
			
		||||
#!/bin/bash
 | 
			
		||||
 | 
			
		||||
# Install oh-my-zsh
 | 
			
		||||
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,4 +1,5 @@
 | 
			
		|||
#!/bin/bash
 | 
			
		||||
 | 
			
		||||
echo "Installing Volta..."
 | 
			
		||||
echo
 | 
			
		||||
curl https://get.volta.sh | bash
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue