X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=zpm-install;h=a9a748df00bf6a28e12d51773dabc8232730d7a5;hb=ada8405d470a7b13eba173bcacfd660e13dfed0d;hp=3ce6e156dcfcabc306efd72646db4b07b8b1b595;hpb=9ca986a5c5facbc18e141f0cfab17c704a2cd998;p=zpackage diff --git a/zpm-install b/zpm-install index 3ce6e15..a9a748d 100755 --- a/zpm-install +++ b/zpm-install @@ -84,6 +84,13 @@ if [ -z "$localdb" ]; then localdb=${rootdir:-/}/var/lib/zpm/local.db fi +if [ ! -f "$localdb" ]; then + zpm init "$localdb" + if [ $? -ne 0 ]; then + die "aborting install" + fi +fi + ZPMDB=$localdb export ZPMDB @@ -185,7 +192,13 @@ for pkgstr in "$@"; do fi if [ $(id -u) -eq 0 ]; then - /sbin/ldconfig + if [ -f $rootdir/sbin/ldconfig ]; then + $rootdir/sbin/ldconfig -r ${rootdir:-/} + elif [ -f /sbin/ldconfig ]; then + /sbin/ldconfig -r ${rootdir:-/} + else + true + fi fi # TODO skip configure if not on a terminal, regardless of settings