[126109] users/pixilla/scripts

pixilla at macports.org pixilla at macports.org
Fri Oct 3 16:27:29 PDT 2014


Revision: 126109
          https://trac.macports.org/changeset/126109
Author:   pixilla at macports.org
Date:     2014-10-03 16:27:29 -0700 (Fri, 03 Oct 2014)
Log Message:
-----------
scripts:
- Update helper scripts.

Modified Paths:
--------------
    users/pixilla/scripts/mp-distributable
    users/pixilla/scripts/mp-port-clean-find-work
    users/pixilla/scripts/mp-port-livecheck
    users/pixilla/scripts/mp-shared-objects
    users/pixilla/scripts/mp-svn-diff-port

Modified: users/pixilla/scripts/mp-distributable
===================================================================
--- users/pixilla/scripts/mp-distributable	2014-10-03 23:24:02 UTC (rev 126108)
+++ users/pixilla/scripts/mp-distributable	2014-10-03 23:27:29 UTC (rev 126109)
@@ -12,7 +12,11 @@
     echo "mp-distributable zlib"
     exit 1
 fi
-PORTS=$(port -q echo "$@")
-for PORT in $PORTS;do
-    ${MP_SVNBASE}/portmgr/jobs/port_binary_distributable.tcl -v "$PORT"
+PORTS=()
+for PORT in "$@";do
+    PORTS+=("${PORT}")
 done
+for ((i = 0; i < ${#PORTS[@]}; i++));do
+echo ${PORTS[$i]}
+    ${MP_SVNBASE}/portmgr/jobs/port_binary_distributable.tcl -v ${PORTS[$i]}
+done

Modified: users/pixilla/scripts/mp-port-clean-find-work
===================================================================
--- users/pixilla/scripts/mp-port-clean-find-work	2014-10-03 23:24:02 UTC (rev 126108)
+++ users/pixilla/scripts/mp-port-clean-find-work	2014-10-03 23:27:29 UTC (rev 126109)
@@ -7,6 +7,9 @@
 : ${MP_SVNDPORTS:="${MP_SVNTRUNK}/dports"}
 
 DIRS=$(find $MP_SVNDPORTS -depth 3 -type l -name work -exec echo {} \; | awk -F/ '{print $(NF-2)"/"$(NF-1)}')
+#echo "MP_PREFIX: ${MP_PREFIX}"
+#echo "MP_SVNDPORTS: ${MP_SVNDPORTS}"
+#echo "DIRS: ${DIRS}"
 for DIR in ${DIRS};do
     sudo port clean $MP_SVNDPORTS/$DIR
-done
\ No newline at end of file
+done

Modified: users/pixilla/scripts/mp-port-livecheck
===================================================================
--- users/pixilla/scripts/mp-port-livecheck	2014-10-03 23:24:02 UTC (rev 126108)
+++ users/pixilla/scripts/mp-port-livecheck	2014-10-03 23:27:29 UTC (rev 126109)
@@ -10,8 +10,13 @@
 fi
 for port in $(port echo $@)
 do 
-    echo $port;
-    port -d livecheck $port 2>&1 | grep -E "cannot check|^$port" | awk '{if ($2 == "The") print "    "$(NF-1)" "$(NF);else if ($2 == "Port") print "    "$0;else print $0;}' | sed -e 's,DEBUG: ,,g' -e 's,Error: ,,g' | uniq;
+    status=$(port -d livecheck $port 2>&1 | grep -E "cannot check|^$port" | awk '{if ($2 == "The") print "    "$(NF-1)" "$(NF);else if ($2 == "Port") print "    "$0;else print $0;}' | sed -e 's,DEBUG: ,,g' -e 's,Error: ,,g' | uniq);
+    echo $status;
+    if [[ "${status}" != "${port} seems to be up to date" ]]
+    then
+        echo -n "    maintainers: ";
+        port -q info --maintainers $port;
+    fi
 done
 
 exit 0

Modified: users/pixilla/scripts/mp-shared-objects
===================================================================
--- users/pixilla/scripts/mp-shared-objects	2014-10-03 23:24:02 UTC (rev 126108)
+++ users/pixilla/scripts/mp-shared-objects	2014-10-03 23:27:29 UTC (rev 126109)
@@ -23,6 +23,7 @@
     -p      Path or Port (requires -m) to check
     -m      Use -p as a port name rather then a path
     -c      Check if shared library exists, print "${eError}" if it does not
+    -d      Destroot, prepend -d to -c file check path
     -a      Print arch
     -q      Quiet, only print errors, implies -c
     -s      Stop on errors
@@ -32,11 +33,12 @@
 
 [ -z $TYPE ] && TYPE=PATH
 [ -z $CHECK_EXISTS ] && CHECK_EXISTS=
+[ -z $DESTROOT ] && DESTROOT=
 [ -z $PRINT_ARCH ] && PRINT_ARCH=
 [ -z $QUIET ] && QUIET=
 [ -z $STOP ] && STOP=
 
-while getopts "hp:mcqs" OPTION
+while getopts "hp:mcd:qs" OPTION
 do
     case $OPTION in
         h)
@@ -52,6 +54,9 @@
         c)
             CHECK_EXISTS=yes
             ;;
+        d)
+            DESTROOT=$OPTARG
+            ;;
         a)
             PRINT_ARCH=yes
             ;;
@@ -100,14 +105,18 @@
             [ -z $PRINT_ARCH ] && lipo -info "${FILES[$fc]}"
             for (( sc = 0 ; sc < ${#SHAREDLIBRARIES[@]} ; sc++ ))
             do
-                if [ ! -f "${SHAREDLIBRARIES[$sc]}" ]
+                if [[ -f "${SHAREDLIBRARIES[$sc]}" ]]
                 then
+                    [ -z $QUIET ] && echo -e "\t${SHAREDLIBRARIES[$sc]}"
+                    [ -z $PRINT_ARCH ] && lipo -info "${SHAREDLIBRARIES[$sc]}"
+                elif [[ ! -z $DESTROOT && -f "${DESTROOT}${SHAREDLIBRARIES[$sc]}" ]]
+                then
+                    [ -z $QUIET ] && echo -e "\t${DESTROOT}${SHAREDLIBRARIES[$sc]}"
+                    [ -z $PRINT_ARCH ] && lipo -info "${DESTROOT}${SHAREDLIBRARIES[$sc]}"
+                else
                     [ -n $QUIET ] && echo "${FILE[$fc]}"
                     echo "SHAREDLIBRARY ${eError}: ${SHAREDLIBRARIES[$sc]}"
                     [ "${STOP}" == "yes" ] && break 2
-                else
-                    [ -z $QUIET ] && echo -e "\t${SHAREDLIBRARIES[$sc]}"
-                    [ -z $PRINT_ARCH ] && lipo -info "${SHAREDLIBRARIES[$sc]}"
                 fi
             done
         fi

Modified: users/pixilla/scripts/mp-svn-diff-port
===================================================================
--- users/pixilla/scripts/mp-svn-diff-port	2014-10-03 23:24:02 UTC (rev 126108)
+++ users/pixilla/scripts/mp-svn-diff-port	2014-10-03 23:27:29 UTC (rev 126109)
@@ -2,10 +2,21 @@
 # mp-svn-diff-port
 # Get svn diff for "port dir <stdin>"
 : ${MP_SVNCMD:=$(which svn)}
-CMD="port dir $@ | sort -u"
-#echo "${CMD}"
-#exit
-DIRS=$(eval $CMD)
-#echo "${DIRS}"
-#exit
-${MP_SVNCMD} diff ${DIRS}
+MP_CMD="port dir $@ | sort -u"
+# echo "MP_CMD: ${MP_CMD}"
+# exit
+MP_DIRS=$(eval $MP_CMD)
+# echo "MP_DIRS: ${MP_DIRS}"
+# exit
+for MP_DIR in $MP_DIRS; do
+# echo "MP_DIR: ${MP_DIR}"
+    MP_DPORTS="${MP_DIR%/*/*}"
+    MP_PORTPARENT="${MP_DIR##*/}"
+    MP_PORTCAT="${MP_DIR%/*}"
+    MP_PORTDIR="${MP_PORTCAT##*/}/${MP_PORTPARENT}"
+# echo "MP_PORTPARENT: $MP_PORTPARENT"
+# echo "MP_PORTCAT: $MP_PORTCAT"
+# echo "MP_PORTDIR: $MP_PORTDIR"
+    cd "${MP_DPORTS}"
+    ${MP_SVNCMD} diff ${MP_PORTDIR}
+done
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20141003/87e7285d/attachment.html>


More information about the macports-changes mailing list