#!/bin/bash

# Define the destination path
destination="/Applications/Firefox.app/Contents/Resources/distribution"

# Check if the directory exists, and create it if not
if [ ! -d "$destination" ]; then
    sudo mkdir -p "$destination"
    sudo chown -R $(whoami):staff "$destination"
fi

# Define the URL and output path
url="https://spin.ai/wp-content/uploads/kb/google-workspace/policies.json"
outputPath="$destination/policies.json"

# Download the policies.json file
curl -o "$outputPath" "$url"