#!/bin/bash

# Variables - Edit these before deployment
PLIST_PATH="/Library/Application Support/com.idrive360.packageinstaller.plist"
GROUP_NAME=""
ENCRYPTION_KEY=""
CONFIGURATION_ID=""
TRAY_HIDDEN=0
DEVICE_TAG=""

# Create plist file
cat <<EOF > "$PLIST_PATH"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>groupName</key>
    <string>$GROUP_NAME</string>
    <key>encryptionKey</key>
    <string>$ENCRYPTION_KEY</string>
    <key>configurationID</key>
    <string>$CONFIGURATION_ID</string>
    <key>trayHidden</key>
    <integer>$TRAY_HIDDEN</integer>
    <key>deviceTag</key>
    <string>$DEVICE_TAG</string>
</dict>
</plist>
EOF
