Created
May 22, 2024 10:27
-
-
Save tyhallcsu/eb9cf9847089d3ea5f3e20304bb3bbdd to your computer and use it in GitHub Desktop.
Script to automatically download all the MacForge addons (for free)
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
#!/bin/bash | |
# ============================================ | |
# MacForge Plugins Downloader | |
# ============================================ | |
# This script extracts URLs of ZIP files from the packages.plist file, | |
# downloads the ZIP files, and unzips them into the specified directory. | |
# | |
# Official MacForge release: https://www.macenhance.com/macforge (v1.1.0) | |
# Beta version: https://github.com/jslegendre/appcast/blob/master/Beta/MacForge/MacForge.1.2.2-3.zip | |
# ============================================ | |
# Path to the plist file | |
plist_file="packages.plist" | |
# Output file for the URLs | |
url_file="macforge_packages_urls.txt" | |
# Directory to save the downloaded files | |
download_dir="/Library/Application Support/MacEnhance/Plugins" | |
# Ensure the download directory exists | |
mkdir -p "$download_dir" | |
# Extract URLs from the plist file | |
grep -oE '/bundles/[^<]*\.zip' "$plist_file" | sed 's|^|https://raw.githubusercontent.com/MacEnhance/MacForgeRepo/master/repo|' > "$url_file" | |
# Download and unzip each file | |
while IFS= read -r url; do | |
# Extract the filename from the URL | |
filename=$(basename "$url") | |
# Download the ZIP file | |
curl -L "$url" -o "$download_dir/$filename" | |
# Unzip the file | |
unzip -o "$download_dir/$filename" -d "$download_dir" | |
# Remove the ZIP file after extraction | |
rm "$download_dir/$filename" | |
done < "$url_file" | |
echo "All files have been downloaded and extracted to $download_dir" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Here's the complete script with a header and instructions to download MacForge:
Instructions to Run the Script
Save the script to a file named
download_and_unzip_macforge_packages.sh
.Make the script executable:
Run the script with
sudo
to ensure it has the necessary permissions to write to/Library/Application Support/MacEnhance/Plugins
:Additional Information
This script will automate the process of extracting URLs, downloading the ZIP files, and unzipping them into the specified directory. Make sure to run the script with
sudo
to have the necessary permissions for writing to the/Library/Application Support/MacEnhance/Plugins
directory.Manual Method
Download all the zip files, and unzip into
/Library/Application Support/MacEnhance/Plugins
directory.Here are those URLS