tazwok rev 38

Adding alternative tazwok.conf.
Update check_for_wanted function.
author Eric Joseph-Alexandre <erjo@slitaz.org>
date Sat Feb 23 19:00:40 2008 +0100 (2008-02-23)
parents d36937a2d64e
children 1123ce59252c
files tazwok
line diff
     1.1 --- a/tazwok	Thu Feb 21 23:47:33 2008 +0100
     1.2 +++ b/tazwok	Sat Feb 23 19:00:40 2008 +0100
     1.3 @@ -35,7 +35,10 @@
     1.4  LIST=$2
     1.5  
     1.6  # Include config file or exit if any file found.
     1.7 -if [ -f "/etc/tazwok.conf" ]; then
     1.8 +
     1.9 +if [ -f "./tazwok.conf" ]; then
    1.10 +	. ./tazwok.conf
    1.11 +elif [ -f "/etc/tazwok.conf" ]; then
    1.12  	. /etc/tazwok.conf
    1.13  else
    1.14  	echo -e "\nUnable to find the configuration file : /etc/tazwok.conf"
    1.15 @@ -167,6 +170,17 @@
    1.16  			echo -e "\nWanted package is missing in the work directory.\n"
    1.17  			exit 0
    1.18  		fi
    1.19 +		# Checking for buildtree of Wanted package
    1.20 +		if [ ! -d "$WOK/$WANTED/$WANTED-$VERSION" ]; then
    1.21 +			echo -e "\n\nSource files of wanted package is missing in the work directory."
    1.22 +			echo -n "Would you like to build the missing package (y/N) ? " ; read anser
    1.23 +			if [ "$anser" == "y" ]; then
    1.24 +				tazwok cook $WANTED
    1.25 +			else
    1.26 +				echo -e "\nWanted package source tree is missing in the work directory.\n"
    1.27 +				exit 0
    1.28 +			fi
    1.29 +		fi
    1.30  		status
    1.31  		# Set wanted src path.
    1.32  		src=$WOK/$WANTED/$WANTED-$VERSION
    1.33 @@ -174,6 +188,7 @@
    1.34  	fi
    1.35  }
    1.36  
    1.37 +
    1.38  # Check for build dependencies and notify user.
    1.39  check_for_build_depends()
    1.40  {