BLFS: Handling the new JDK version string format.

This commit is contained in:
Manuel Canales Esparcia 2007-08-13 18:43:08 +00:00
parent 69f2b810a8
commit e6a616d6b0

View file

@ -27,13 +27,12 @@ get_pkg_ver() { # Find package version for a given package ID
wireless_tools ) pkg_id=wireless-tools ;; wireless_tools ) pkg_id=wireless-tools ;;
bind-utils ) pkg_id=bind ;; bind-utils ) pkg_id=bind ;;
html-tidy ) pkg_id=tidy ;; html-tidy ) pkg_id=tidy ;;
jdk ) pkg_id=jdk-src ;;
reiserfs ) pkg_id=reiser ;; reiserfs ) pkg_id=reiser ;;
xfs ) pkg_id=xfsprogs ;; xfs ) pkg_id=xfsprogs ;;
esac esac
xmllint --noent ./${BLFS_XML}/book/bookinfo.xml 2>/dev/null | \ xmllint --noent ./${BLFS_XML}/book/bookinfo.xml 2>/dev/null | \
grep -i " ${pkg_id}-version " | cut -d "\"" -f2 grep -i " ${pkg_id}-version " | cut -d "\"" -f2 | sed "s/ /_/g"
} }
@ -57,7 +56,7 @@ get_installed_ver() { # Find installed package version for a given package ID
find $TRACKING_DIR -name "${pkg_id}-p[[:digit:]]*" | sed "s/.*${pkg_id}-//" find $TRACKING_DIR -name "${pkg_id}-p[[:digit:]]*" | sed "s/.*${pkg_id}-//"
;; ;;
* ) * )
find $TRACKING_DIR -name "${pkg_id}-[[:digit:]]*" | sed "s/.*${pkg_id}-//" find $TRACKING_DIR -name "${pkg_id}-[[:digit:]]*" | sed "s/.*${pkg_id}-//" | sed "s/ /_/g"
;; ;;
esac esac