tazpkg view modules/reconfigure @ rev 846

Remove "busybox" "prefixes" (thanks llev)
We used "busybox wget", etc. to be sure we called Busybox's "wget", not any other "wget". Workaround already done in "getenv" module.
author Aleksej Bobylev <al.bobylev@gmail.com>
date Fri Oct 09 13:14:01 2015 +0300 (2015-10-09)
parents d6cbd0c5f273
children b6daeaa95431
line source
1 #!/bin/sh
2 # TazPkg - Tiny autonomous zone packages manager, hg.slitaz.org/tazpkg
3 # reconfigure - TazPkg module
4 # Replay post_install from receipt
7 # Connect function libraries
8 . /lib/libtaz.sh
10 # Get TazPkg working environment
11 . @@MODULES@@/getenv
16 PACKAGE="$1"
18 # Receipt function caller
19 # Why? "Bad" receipt sourcing can redefine some vital TazPkg variables.
20 # Few receipts function should be patched now.
22 # Check for post_install function
23 if grep -q '^post_install()' "$INSTALLED/$PACKAGE/receipt"; then
24 action 'Execute post-install commands...'
25 tmp="$(mktemp)"
26 cp "$1" "$tmp"
27 sed -i 's|$1/*$INSTALLED|$INSTALLED|g' "$tmp"
28 ( . "$tmp"; post_install "$root" )
29 status
30 rm "$tmp"
31 # Log this activity
32 tazpkg call log_pkg Reconfigured
33 else
34 newline
35 _ 'Nothing to do for package "%s".' "$PACKAGE"
36 fi