![](https://secure.gravatar.com/avatar/73a8f5105a881a41b5fe876b1ca926fc.jpg?s=120&d=mm&r=g)
Hey there, For some time, I thought it would be better not to support pre- and post-install scripts in prt-get but I decided I'll leave this choice to the user ;-). The more, there was some discussion about better ways to support pre-/post-installation, but nothing actually worked out. As we currently have some ports with post-install scripts, I decided to offer a simple solution which might be removed once there's a better way to do it (e.g. in pkgutils). The current implementation is meant to simplify installation of large suites of packages like gnome or kde. Credits for an initial version of this go to Daniel Müller, unfortunately I didn't find his patch anymore therefore his name didn't make it into prt-get's source code ;-). I've uploaded prt-get 0.5.2pre2 (just update the Pkgfile) which has the following new switches: --pre-install (execute pre-install scripts) --post-install (execute post-install scripts) --install-scripts (execute both pre- and post-install) Testing from interested packagers is very much appreciated! 0.5.2pre2 also includes a 'remove' command to call pkgrm on an arbitrary number of ports: prt-get remove perl ruby python For users of the programmable bash completion, I've updated misc/prt-get_complete as well (in the tarball). Notes: - the scripts must be in the port's directory and have the exact name 'pre-install' and 'post-install' - They're executed for every install and update; therefore, the packager must ensure that things work even if the very same script was already called during an earlier install; - failing pre/post scripts don't interrupt the installation process - the listing in the very end will tell you which ports had pre/post scripts and whether it succeeded or not - In test mode, you won't see whether scripts would be executed Example session: [15:43][root@hoc:~]# prt-get install prepost --install-scripts ... -- Packages installed prepost [pre: ok] [post: ok] prt-get: installed successfully [15:44][root@hoc:~]# Things left to do: - show whether there are pre-/post-install scripts in prt-get info - config file option ("always execute scripts"; not sure yet) - some uninstall equivalent; would benefit from a better specification of crux' pre/post-(un)install functionality though Kind regards, Johannes -- Johannes Winkelmann mailto:jw@tks6.net Biel, Switzerland http://jw.tks6.net