On Fri, Dec 9, 2011 at 9:20 AM, Michael Olbrich wrote: > Signed-off-by: Michael Olbrich > --- > > Does this look right? I'm also checking for '~' before alpha etc. otherwise > it will be duplicated if it's already there. > > Michael > > scripts/lib/ptxd_make_xpkg_common.sh | 4 +++- > 1 files changed, 3 insertions(+), 1 deletions(-) > > diff --git a/scripts/lib/ptxd_make_xpkg_common.sh > b/scripts/lib/ptxd_make_xpkg_common.sh > index deccd12..e1b7013 100644 > --- a/scripts/lib/ptxd_make_xpkg_common.sh > +++ b/scripts/lib/ptxd_make_xpkg_common.sh > @@ -70,9 +70,11 @@ ptxd_make_xpkg_init() { > # > # sanitize pkg_version > # > + # separate (alpha|beta|gamma|rc) with "~" > # replace "_" by "." > + # replace "-" by "+" > # > - pkg_xpkg_version="${pkg_version//_/.}" > + pkg_xpkg_version="$(sed -r 's/[~-]?(alpha|beta|gamma|rc)/~\1/g' <<< > ${pkg_version} | tr '_-' '.+')" > if [ -z ${pkg_xpkg_version} ]; then > ptxd_bailout "${FUNCNAME}: please define _VERSION" > fi > I tested this with the dialog package and it worked as expected. Jon