From 5743d54b5714193203e8acb2e6bdc5b77301d0c8 Mon Sep 17 00:00:00 2001 From: Manuel Canales Esparcia Date: Sat, 19 Aug 2006 14:45:07 +0000 Subject: [PATCH] Let gen-makefile.sh to get package version from packages database. --- BLFS/gen-makefile.sh | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/BLFS/gen-makefile.sh b/BLFS/gen-makefile.sh index 1841e39..a470d51 100755 --- a/BLFS/gen-makefile.sh +++ b/BLFS/gen-makefile.sh @@ -50,10 +50,18 @@ __wrt_touch() { # #----------------------------------# local pkg_name=$1 local pkg_ver=$2 + + if [[ -n "$pkg_ver" ]] ; then +( +cat << EOF + @touch \$(TRACKING_DIR)/${pkg_name#*-?-}-${pkg_ver} +EOF +) >> $MKFILE.tmp + fi + ( cat << EOF @touch \$@ && \\ - touch \$(TRACKING_DIR)/${pkg_name#*-?-}-${pkg_ver} && \\ sleep .25 && \\ echo -e "\n\n "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\ echo --------------------------------------------------------------------------------\$(WHITE) @@ -67,7 +75,7 @@ __write_entry() { # #----------------------------# local script_name=$1 local pkg_ver=$2 - + echo -n "${tab_}${tab_} entry for <$script_name>" #--------------------------------------------------------------------# @@ -103,12 +111,10 @@ generate_Makefile () { # for package_script in scripts/* ; do this_script=`basename $package_script` - script_ver=$(xmllint --noent ../blfs-xml/book/bookinfo.xml 2>/dev/null | \ - grep -i " ${this_script#*-?-}-version " | \ - cut -d "\"" -f2 ) + pkg_ver=$(grep "^${this_script#*-?-}[[:space:]]" ../packages | cut -f3) if [ ! -e $TRACKING_DIR/${this_script#*-?-}-$script_ver ]; then pkg_list="$pkg_list ${this_script}" - __write_entry "${this_script}" "${script_ver}" + __write_entry "${this_script}" "${pkg_ver}" PREV_PACKAGE=${this_script} fi done