tazpkg diff modules/convert @ rev 898

Module 'get': fix temp dir; module 'find-depends': faster search, add debug messages
author Aleksej Bobylev <al.bobylev@gmail.com>
date Tue Dec 29 22:00:47 2015 +0200 (2015-12-29)
parents 06763cedfc7c
children e5b93f147f2b
line diff
     1.1 --- a/modules/convert	Sat Dec 19 13:50:01 2015 +0200
     1.2 +++ b/modules/convert	Tue Dec 29 22:00:47 2015 +0200
     1.3 @@ -366,16 +366,24 @@
     1.4  	parse_pkgname .pet
     1.5  	busybox tar -xzf "$PACKAGE_FILE"
     1.6  
     1.7 -	PET_SPECS="$(find $TMP_DIR -maxdepth 2 -name 'pet.specs')"
     1.8 +	# Get package description
     1.9 +	PET_SPECS="$(find $TMP_DIR -maxdepth 2 -type f -name 'pet.specs')"
    1.10  	if [ -e "$PET_SPECS" ]; then
    1.11  		debug "pet.specs with '|'"
    1.12  		desc="$(awk -F'|' '{print $10}' $PET_SPECS)"
    1.13 -		debug "desc='$desc'"
    1.14  	else
    1.15 -		# TODO: I need to have '.pet' file that will work this way!
    1.16 -		. $package*/*.specs
    1.17 -		desc="$PETMENUDESCR"
    1.18 +		PET_SPECS="$(find $TMP_DIR -maxdepth 2 -type f -name '*.pet.specs')"
    1.19 +		if [ -e "$PET_SPECS" ]; then
    1.20 +			desc="$(. "$PET_SPECS"; echo "$PETMENUDESCR")"
    1.21 +		else
    1.22 +			DESKTOP="$(find $TMP_DIR -type f -name '*.desktop' | head -n1)"
    1.23 +			if [ -n "$DESKTOP" ]; then
    1.24 +				desc="$(awk -F'=' '($1=="Name"){print $2}' $DESKTOP)"
    1.25 +			fi
    1.26 +		fi
    1.27  	fi
    1.28 +	[ -z "$desc" ] && desc="$package"
    1.29 +	debug "desc='$desc'"
    1.30  	mv $package*/ fs
    1.31  	finish_convert_puppy
    1.32  }