use separate function for running pkg pre/post scripts