pkgbuild - osx - remove files as part of pkg installation -


using pkgbuild create installer osx application. there way add install step, delete files? in particular example - when run application creates new file in directory binary located. installation of new version replaces binary, leaves created file. need "fresh start" after installation of new version.

you can add postinstall script package , delete files not required more. create shell script , put code deleting files in it. name script postinstall (without extension) , put in folder named script. create package command:

/usr/bin/pkgbuild \     --root "$root_location" \     --install-location "$install_location" \     --identifier "$identifier" \     --version "$version" \     --scripts "scripts" \     "$name.pkg" 

when installer runs postinstall script passes useful information path on script running , on. can read these information input arguments $1, $2, ...


Comments

Popular posts from this blog

Hatching array of circles in AutoCAD using c# -

ios - UITEXTFIELD InputView Uipicker not working in swift -

Python Pig Latin Translator -