2 # shell script to validate your iplug audiounit using auval
3 # run from terminal with the argument leaks to perform the leaks test (See auval docs)
9 OS_VERSION
=`sw_vers -productVersion | egrep -o '10\.[0-9]+'`
14 if [[ $OS_VERSION == "10.9" ]] ||
[[ $OS_VERSION == "10.10" ]]
23 PUID
=`echo | grep PLUG_UNIQUE_ID resource.h`
24 PUID
=${PUID//\#define PLUG_UNIQUE_ID }
27 PMID
=`echo | grep PLUG_MFR_ID resource.h`
28 PMID
=${PMID//\#define PLUG_MFR_ID }
31 PII
=`echo | grep PLUG_IS_INST resource.h`
32 PII
=${PII//\#define PLUG_IS_INST }
34 PDM
=`echo | grep PLUG_DOES_MIDI resource.h`
35 PDM
=${PDM//\#define PLUG_DOES_MIDI }
39 if [ $PII == 1 ] # instrument
43 if [ $PDM == 1 ] # midi effect
49 if [ "$1" == "leaks" ]
51 echo "testing for leaks (i386 32 bit)"
52 echo 'launch a new shell and type: ps axc|awk "{if (\$5==\"auvaltool\") print \$1}" to get the pid';
55 export MallocStackLogging
=1
56 set env MallocStackLoggingNoCompact
=1
58 auval
$x86_ARGS -v $TYPE $PUID $PMID -w -q
60 unset MallocStackLogging
64 echo "\nvalidating i386 32 bit... ------------------------"
65 echo "--------------------------------------------------"
66 echo "--------------------------------------------------"
67 echo "--------------------------------------------------"
68 echo "--------------------------------------------------"
69 echo "--------------------------------------------------"
71 auval
$x86_ARGS -v $TYPE $PUID $PMID
73 echo "\nvalidating i386 64 bit... ------------------------"
74 echo "--------------------------------------------------"
75 echo "--------------------------------------------------"
76 echo "--------------------------------------------------"
77 echo "--------------------------------------------------"
78 echo "--------------------------------------------------"
80 auval
$x64_ARGS -v $TYPE $PUID $PMID