[rkward/releases/0.6.5] macports: enable setting of target version manually

m.eik michalke meik.michalke at uni-duesseldorf.de
Mon Mar 14 08:35:41 UTC 2016


Git commit 4bce5ac289dec12eb4ca7a25e79228860a8f399b by m.eik michalke.
Committed on 14/03/2016 at 08:35.
Pushed by meikm into branch 'releases/0.6.5'.

enable setting of target version manually

  - there's probably still some confusion about $PORTVERS, i was getting 0.6.4 when releases/0.6.5 was installed. have to check

M  +35   -28   macports/update_bundle.sh

http://commits.kde.org/rkward/4bce5ac289dec12eb4ca7a25e79228860a8f399b

diff --git a/macports/update_bundle.sh b/macports/update_bundle.sh
index b7e05f1..2f0c6fc 100755
--- a/macports/update_bundle.sh
+++ b/macports/update_bundle.sh
@@ -31,6 +31,7 @@ MKSRCTAR=false
 COPYMDMD=false
 WIPEDSTF=false
 WIPEINST=false
+GETTARGVERS=true
 
 PVARIANT=""
 GITBRANCH="master"
@@ -109,12 +110,14 @@ if [[ $1 == "" ]] ; then
            -r  update port ${PTARGET}
            -m  create .mpkg of ${PTARGET}
            -s  create sources .tar
-           -c  move .mpkg and src.tar to ${LPUBDIR}, if created"
+           -c  move .mpkg and src.tar to ${LPUBDIR}, if created
+           -t  set target version for -c manually
+"
 exit 0
 fi
 
 # get the options
-while getopts ":CDE:dbfGlLprmsS:cU:xXF:" OPT; do
+while getopts ":CDE:dbfGlLprmsS:cU:xXF:t:" OPT; do
   case $OPT in
     U) GITUSER=$OPTARG >&2 ;;
     E) GITMAIL=$OPTARG >&2 ;;
@@ -149,6 +152,8 @@ while getopts ":CDE:dbfGlLprmsS:cU:xXF:" OPT; do
        MAKEMDMD=true >&2 ;;
     s) MKSRCTAR=true >&2 ;;
     c) COPYMDMD=true >&2 ;;
+    t) GETTARGVERS=false >&2
+       TARGETVERS=$OPTARG >&2 ;;
     x) WIPEDSTF=true >&2 ;;
     X) WIPEDSTF=false >&2
        WIPEINST=true >&2 ;;
@@ -370,34 +375,36 @@ fi
 if $COPYMDMD ; then
   # get version information of installed ports
   PORTVERS=$("${MPTINST}/bin/port" list $PTARGET | sed -e "s/.*@//;s/[[:space:]].*//")
-  if $DEVEL ; then
-    # we moved to git
-    # TARGETVERS=${PORTVERS}$(svn info "$SVNREPO" | grep "^Revision:" | sed "s/[^[:digit:]]*//")
-    # 
-    # this one-liner would give us the latest commit hash, but no date -- bad for humans and sorting:
-    # TARGETVERS=${PORTVERS}$(git ls-remote http://anongit.kde.org/rkward master | cut -c 1-7)
-    # 
-    # so here's something a little more elaborate...
-    TEMPFILE=$(mktemp /tmp/git_rev.XXXXXX || exit 1)
-    if ! [[ $(which wget) == "" ]] ; then
-      wget -q -O "${TEMPFILE}" "http://quickgit.kde.org/?p=rkward.git" || exit 1
-      GOTQUICKGIT=true
-    elif ! [[ $(which curl) == "" ]] ; then
-      curl -s -o "${TEMPFILE}" "http://quickgit.kde.org/?p=rkward.git" || exit 1
-      GOTQUICKGIT=true
+  if $GETTARGVERS ; then
+    if $DEVEL ; then
+      # we moved to git
+      # TARGETVERS=${PORTVERS}$(svn info "$SVNREPO" | grep "^Revision:" | sed "s/[^[:digit:]]*//")
+      # 
+      # this one-liner would give us the latest commit hash, but no date -- bad for humans and sorting:
+      # TARGETVERS=${PORTVERS}$(git ls-remote http://anongit.kde.org/rkward master | cut -c 1-7)
+      # 
+      # so here's something a little more elaborate...
+      TEMPFILE=$(mktemp /tmp/git_rev.XXXXXX || exit 1)
+      if ! [[ $(which wget) == "" ]] ; then
+        wget -q -O "${TEMPFILE}" "http://quickgit.kde.org/?p=rkward.git" || exit 1
+        GOTQUICKGIT=true
+      elif ! [[ $(which curl) == "" ]] ; then
+        curl -s -o "${TEMPFILE}" "http://quickgit.kde.org/?p=rkward.git" || exit 1
+        GOTQUICKGIT=true
+      else
+        echo "neither wget nor curl found, only commit can be used!"
+        TARGETVERS=${PORTVERS}-git$(git ls-remote http://anongit.kde.org/rkward master | cut -c 1-7)
+        GOTQUICKGIT=false
+      fi
+      if ${GOTQUICKGIT} ; then
+        CHANGEDATE=$(grep "last change.*<time datetime=" "${TEMPFILE}" | sed "s/.*datetime=\"\(.*\)+00:00.*/\1/g" | sed "s/[^[:digit:]]//g")
+        LASTCOMMIT=$(grep -m1 "<td class=\"monospace\">[[:alnum:]]\{7\}" "${TEMPFILE}" | sed "s#.*<td class=\"monospace\">\(.*\)</td>.*#\1#")
+        TARGETVERS="${PORTVERS}-git${CHANGEDATE}~${LASTCOMMIT}"
+      fi
+      rm "${TEMPFILE}"
     else
-      echo "neither wget nor curl found, only commit can be used!"
-      TARGETVERS=${PORTVERS}-git$(git ls-remote http://anongit.kde.org/rkward master | cut -c 1-7)
-      GOTQUICKGIT=false
+      TARGETVERS="$PORTVERS"
     fi
-    if ${GOTQUICKGIT} ; then
-      CHANGEDATE=$(grep "last change.*<time datetime=" "${TEMPFILE}" | sed "s/.*datetime=\"\(.*\)+00:00.*/\1/g" | sed "s/[^[:digit:]]//g")
-      LASTCOMMIT=$(grep -m1 "<td class=\"monospace\">[[:alnum:]]\{7\}" "${TEMPFILE}" | sed "s#.*<td class=\"monospace\">\(.*\)</td>.*#\1#")
-      TARGETVERS="${PORTVERS}-git${CHANGEDATE}~${LASTCOMMIT}"
-    fi
-    rm "${TEMPFILE}"
-  else
-    TARGETVERS="$PORTVERS"
   fi
   KDEVERS=$("${MPTINST}/bin/port" list kdelibs4 | sed -e "s/.*@//;s/[[:space:]].*//")
 fi



More information about the rkward-tracker mailing list