Volumes/YourPathHere/AvastInstallerName.pkg) pkg on the script to replace the path starting after -pkg on that line (e.g. The easiest way to resolve this is by mounting your avast dmg on the desktop and dragging the.
If your Avast installer is different, this may be different. We use Avast Business, so after 'avast.dmg' is mounted, it's friendly name path is used on the line that starts with '/usr/sbin/installer'. You'll see the last line of the script is referencing it as '/avast.dmg' so it is important you either place it there with that exact name, or adjust the script accordingly. I do this by packaging the dmg through composer on the root of your main disk. You will need to put the DMG that avast provides on the root of the main disk.