#!/bin/bash
#
# This postflight script echoes the values of the available 
# arguments and environmental variables.
# com.plogue.InstallatorCarbon
echo "Start postflight script"
# PLIST="$HOME/Library/Preferences/com.plogue.aria"
# echo "defaults write $PLIST \"base_dir\" \"$2/\""
# defaults write $PLIST "base_dir" "$2/"
# davidv su $USER -c "defaults write com.plogue.aria base_dir \"$2/\""

defaults write "/Library/Preferences/com.plogue.aria" base_dir "$2"
defaults write "/Library/Preferences/com.plogue.aria" path "$2/Aria.bundle"
su $USER -c "defaults write com.plogue.aria base_dir \"$2\""
su $USER -c "defaults write com.plogue.aria path \"$2/Aria.bundle\""

su $USER -c "$1/Contents/Resources/AriaSystemToUser"

echo "End postflight script"
exit 0
