From: sebt3 Date: Sat, 1 Oct 2011 15:32:54 +0000 (-0400) Subject: Added package tags support X-Git-Tag: sz_beta3~33 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?p=pandora-libraries.git;a=commitdiff_plain;h=cd8c5f0fa1845ac31bb155e405e9fdedd9dc0022 Added package tags support --- diff --git a/testdata/scripts/genpxml.sh b/testdata/scripts/genpxml.sh index 1ccf191..6eb2207 100755 --- a/testdata/scripts/genpxml.sh +++ b/testdata/scripts/genpxml.sh @@ -4,14 +4,14 @@ help(){ cat >&2 < : Define source directory (default: $SRCDIR) --n|--name : Define the pnd base name (default: $PND_NAME) +-n|--name : Define the pnd base name (default: $PND_NAME) -d|--dest : Define destination directory (default: $DESTDIR) -a|--author : programmers names (default: $AUTHOR) -v|--version : Define the version (default: $VERSION) -w|--website : Define the url (default: $WEBSITE) -b|--build : Define the build number (default: $BUILD) --f|--force : overide PXML.xml file if found --h|--help : show this screen +-f|--force : overide PXML.xml file if found +-h|--help : show this screen ENDHELP } @@ -22,7 +22,7 @@ DEBUG(){ buildApplicationList(){ #output " []" lines cd $DESTDIR - DESTLST=$(find $SRCDIR -name "*desktop";find $DESTDIR -name "*desktop") + DESTLST=$(find $SRCDIR -name "*.desktop";find $DESTDIR -name "*.desktop") if [ ! -z "$DESTLST" ];then { for d in $DESTLST;do @@ -53,6 +53,7 @@ genLaunchScript() { S="$DESTDIR/scripts/$(basename $1).sh" if [ -e $S ];then mv $S ${S}.old + chmod -x ${S}.old fi cat>$S<" done echo " " + elif [ $(buildApplicationList|wc -l) -eq 1 ] && [ ! -z "$(find $DESTDIR/previews -type f)" ];then + echo " " + for i in $(find $DESTDIR/previews -type f);do + echo " " + done + echo " " else cat < ENDASSO fi - echo + + # Preview pics ------------------ + cat < + + +--> +ENDLICEN + # Documentation ----------------- HTML=$(find $DESTDIR -type d -name index.html|head -1) @@ -235,11 +251,29 @@ genPxml(){ if [ -e $DESTDIR/PXML.xml ];then mv $DESTDIR/PXML.xml $DESTDIR/PXML.xml.old fi + + MAJOR=$(echo $VERSION|awk -F. '{print $1}') + MINOR=$(echo $VERSION|awk -F. '{print $2}') + REL=$(echo $DVERSION|awk -F. '{print $3}') + MINOR=${MINOR:-"0"} + REL=${REL:-"0"} + cat >$DESTDIR/PXML.xml < - + + + + + + $PND_NAME + + + $PND_NAME + + + ENDHEAD if [ ! -d $DESTDIR/previews ];then mkdir -p $DESTDIR/previews @@ -269,11 +303,10 @@ ENDINFO FORCE=0 BUILD=1 -AUTHOR=sebt3 -WEBSITE=${WEBSITE:-"http://www..openpandora.org"} +AUTHOR=${AUTHOR:-${PND_AUTHOR:-"$(whoami)"}} +WEBSITE=${WEBSITE:-${PND_WEBSITE:-"http://www.openpandora.org/"}} SRCDIR=${SRCDIR:-$(pwd)} -PND_NAME=$PRJ -PND_NAME=${PND_NAME:-$(basename $SRCDIR|awk -F- '{print $1}')} +PND_NAME=${PND_NAME:-${PRJ:-$(basename $SRCDIR|awk -F- '{print $1}')}} VERSION=${VERSION:-$(basename $SRCDIR|awk -F- '{print $2}')} DESTDIR=${DESTDIR:-"/mnt/utmp/$PND_NAME"} RND=$RANDOM