tazwok rev 244

Confirm that TARBALL exist before check if src folder doesn't exist.
author Christopher Rogers <slaxemulator@gmail.com>
date Wed Feb 09 19:17:52 2011 +0000 (2011-02-09)
parents 96231de1f61b
children 321c5e6f8d27
files tazwok
line diff
     1.1 --- a/tazwok	Mon Feb 07 21:48:52 2011 +0000
     1.2 +++ b/tazwok	Wed Feb 09 19:17:52 2011 +0000
     1.3 @@ -531,21 +531,22 @@
     1.4  		[ -d "$tmp_src" ] && rm -r $tmp_src
     1.5  		return
     1.6  	fi
     1.7 -		
     1.8 -	if [ ! -d "$src" ]; then
     1.9 -		if [ -d "$tmp_src" ]; then
    1.10 -			if ! check_for_var_modification src _pkg; then
    1.11 -				src="${src%/*}/$(ls $tmp_src)"
    1.12 +	if [ "$TARBALL" ]; then
    1.13 +		if [ ! -d "$src" ]; then
    1.14 +			if [ -d "$tmp_src" ]; then
    1.15 +				if ! check_for_var_modification src _pkg; then
    1.16 +					src="${src%/*}/$(ls $tmp_src)"
    1.17 +				fi
    1.18 +				mv $(echo $tmp_src/*) "$src"
    1.19 +				rm -r $tmp_src
    1.20 +						
    1.21 +				# Permissions settings.
    1.22 +				chown -R root.root "$src"
    1.23  			fi
    1.24 -			mv $(echo $tmp_src/*) "$src"
    1.25 -			rm -r $tmp_src
    1.26 -						
    1.27 -			# Permissions settings.
    1.28 -			chown -R root.root "$src"
    1.29 +			report end-step
    1.30 +		else
    1.31 +			echo "There's already something at $src. Abort." >&2
    1.32  		fi
    1.33 -		report end-step
    1.34 -	else
    1.35 -		echo "There's already something at $src. Abord." >&2
    1.36  	fi
    1.37  }
    1.38