#!/bin/bash # Function to install packwiz and add it to the system path install_packwiz() { # Download packwiz executable wget https://seafsh.cc/u/O5JTlL -O packwiz # Move packwiz executable to a system directory (you may need sudo) sudo mv packwiz /usr/local/bin/packwiz # Add packwiz to the system path echo 'export PATH="$PATH:/usr/local/bin"' >> ~/.bashrc source ~/.bashrc # Generate autocompletion script packwiz completion bash > ~/.packwiz echo 'source ~/.packwiz' >> ~/.bashrc } # Function to create symlink for pre-commit hook create_symlink() { # Check if .git/hooks directory exists if [ ! -d ".git/hooks" ]; then echo "Error: .git/hooks directory does not exist" exit 1 fi # Create symlink for pre-commit hook ln -s "$(pwd)/scripts/hooks/post-commit" "$(pwd)/.git/hooks/post-commit" # Verify symlink creation ls -l .git/hooks/post-commit } # Main function main() { # Install packwiz install_packwiz # Create symlink for pre-commit hook create_symlink echo "Development environment setup complete!" } # Execute main function main