tazpkg diff modules/mkdb @ rev 844

Finish modularization. Beta release: still have few FIXMEs and TODOs.
author Aleksej Bobylev <al.bobylev@gmail.com>
date Mon Oct 05 03:53:47 2015 +0300 (2015-10-05)
parents a02e36d44d06
children 8a73a58ed3cb
line diff
     1.1 --- a/modules/mkdb	Fri Aug 28 16:10:34 2015 +0300
     1.2 +++ b/modules/mkdb	Mon Oct 05 03:53:47 2015 +0300
     1.3 @@ -61,22 +61,20 @@
     1.4  # There are DB records for all files installed with the package.
     1.5  
     1.6  
     1.7 -# Preparations
     1.8 -# Get config values (CHECKSUM)
     1.9 -. /etc/slitaz/slitaz.conf
    1.10 -# Connect functions library
    1.11 +# Connect function libraries
    1.12  . /lib/libtaz.sh
    1.13  
    1.14 +# Get TazPkg working environment
    1.15 +. @@MODULES@@/getenv
    1.16  
    1.17 -# Report error and finish work
    1.18 -die() { longline "$(_ "$@")" >&2; exit 1; }
    1.19 +
    1.20  
    1.21  
    1.22  # Exit if input folder not specified
    1.23  [ -z "$1" ] && die 'Input folder not specified'
    1.24  
    1.25  # Exit if input folder not exists
    1.26 -folder=$(realpath "$1") || exit 1
    1.27 +folder=$(realpath "$root$1") || exit 1
    1.28  
    1.29  # Exit if folder is not writable
    1.30  [ ! -w "$folder" ] && die 'You are not allowed to write to the folder "%s"' "$folder"