tazpkg annotate 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
rev   line source
al@844 1 #!/bin/sh
al@844 2 # TazPkg - Tiny autonomous zone packages manager, hg.slitaz.org/tazpkg
al@844 3 # reconfigure - TazPkg module
al@844 4 # Replay post_install from receipt
al@844 5
al@844 6
al@844 7 # Connect function libraries
al@844 8 . /lib/libtaz.sh
al@844 9
al@844 10 # Get TazPkg working environment
al@844 11 . @@MODULES@@/getenv
al@844 12
al@844 13
al@844 14
al@844 15
al@844 16 PACKAGE="$1"
al@844 17
al@846 18 # Receipt function caller
al@846 19 # Why? "Bad" receipt sourcing can redefine some vital TazPkg variables.
al@846 20 # Few receipts function should be patched now.
al@846 21
al@846 22 # Check for post_install function
al@846 23 if grep -q '^post_install()' "$INSTALLED/$PACKAGE/receipt"; then
al@846 24 action 'Execute post-install commands...'
al@846 25 tmp="$(mktemp)"
al@846 26 cp "$1" "$tmp"
al@846 27 sed -i 's|$1/*$INSTALLED|$INSTALLED|g' "$tmp"
al@846 28 ( . "$tmp"; post_install "$root" )
al@846 29 status
al@846 30 rm "$tmp"
al@844 31 # Log this activity
al@844 32 tazpkg call log_pkg Reconfigured
al@844 33 else
al@844 34 newline
al@844 35 _ 'Nothing to do for package "%s".' "$PACKAGE"
al@844 36 fi