[88856] users/pixilla

pixilla at macports.org pixilla at macports.org
Fri Jan 13 06:15:09 PST 2012


Revision: 88856
          http://trac.macports.org/changeset/88856
Author:   pixilla at macports.org
Date:     2012-01-13 06:15:08 -0800 (Fri, 13 Jan 2012)
Log Message:
-----------
users/pixilla:
- Reorganize scripts.

Added Paths:
-----------
    users/pixilla/scripts/
    users/pixilla/scripts/mp-shared-objects
    users/pixilla/scripts/mp-shared-objects-dir/
    users/pixilla/scripts/mp-svn-propedit
    users/pixilla/scripts/mp-trac-user-ports

Removed Paths:
-------------
    users/pixilla/dports/devel/mp-shared-objects/
    users/pixilla/dports/devel/mp-version-check/
    users/pixilla/scripts/mp-shared-objects-dir/Portfile
    users/pixilla/scripts/mp-shared-objects-dir/files/

Copied: users/pixilla/scripts/mp-shared-objects (from rev 87860, users/pixilla/dports/devel/mp-shared-objects/files/mp-shared-objects)
===================================================================
--- users/pixilla/scripts/mp-shared-objects	                        (rev 0)
+++ users/pixilla/scripts/mp-shared-objects	2012-01-13 14:15:08 UTC (rev 88856)
@@ -0,0 +1,110 @@
+#!/bin/bash
+# Argument = [-q] <path name>
+
+eError="error: no such path"
+
+usage()
+{
+cat << EOF
+
+usage: $(basename $0) options
+
+This script runs otool -XL over the contents of a path:
+\$ $(basename $0) -p /opt/local/lib/mysql5
+or a MacPorts port name:
+\$ $(basename $0) -p mysql5 -m
+
+
+OPTIONS:
+    -h      Show this message
+    -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
+    -q      Quite, only print errors, implies -c
+    -s      Stop on errors
+
+EOF
+}
+
+[ -z $TYPE ] && TYPE=PATH
+[ -z $CHECK_EXISTS ] && CHECK_EXISTS=
+[ -z $QUITE ] && QUITE=
+[ -z $STOP ] && STOP=
+
+while getopts "hp:mcqs" OPTION
+do
+    case $OPTION in
+        h)
+            usage
+            exit 1
+            ;;
+        p)
+            NAME=$OPTARG
+            ;;
+        m)
+            TYPE=PORT
+            ;;
+        c)
+            CHECK_EXISTS=yes
+            ;;
+        q)
+            QUITE=yes
+            CHECK_EXISTS=yes
+            ;;
+        s)
+            STOP=yes
+            ;;
+        ?)
+            usage
+            exit
+            ;;
+    esac
+done
+
+if [[ -z $NAME ]]
+then
+    usage
+    exit 1
+fi
+
+IFS=$'\n'
+if [ "${TYPE}" == "PATH" ]
+then
+  FILES=( $(find "${NAME}" -type f) )
+fi
+if [ "${TYPE}" == "PORT" ]
+then
+  FILES=( $(port -q contents "${NAME}" | sed -e "s/^ *//") )
+fi
+for (( fc = 0 ; fc < ${#FILES[@]} ; fc++ ))
+do
+    if [[ ! -f "${FILES[$fc]}" && ! -d "${FILES[$fc]}" ]]
+    then
+        echo "FILE ${eError}: ${FILES[$fc]}"
+        break 1
+    fi
+    if [ ! -d "${FILES[$fc]}" ]
+    then    
+        SHAREDLIBRARYS=( $(otool -XL "${FILES[$fc]}" | sed -e "s/^Archive.*//" | tr -d '\t' | awk '{print $1}') )
+        if [[ ${#SHAREDLIBRARYS[@]} -gt 0 ]]
+        then
+            [ -z $QUITE ] && echo "${FILES[$fc]}"
+            for (( sc = 0 ; sc < ${#SHAREDLIBRARYS[@]} ; sc++ ))
+            do
+                if [ ! -f "${SHAREDLIBRARYS[$sc]}" ]
+                then
+                    [ -n $QUITE ] && echo "${FILE[$fc]}"
+                    echo "SHAREDLIBRARY ${eError}: ${SHAREDLIBRARYS[$sc]}"
+                    [ "${STOP}" == "yes" ] && break 2
+                else
+                    [ -z $QUITE ] && echo -e "\t${SHAREDLIBRARYS[$sc]}"
+                fi
+            done
+        fi
+    fi
+done
+unset IFS
+unset NAME
+unset CHECK_EXISTS
+unset QUITE
+

Deleted: users/pixilla/scripts/mp-shared-objects-dir/Portfile
===================================================================
--- users/pixilla/dports/devel/mp-shared-objects/Portfile	2011-12-09 18:03:29 UTC (rev 87860)
+++ users/pixilla/scripts/mp-shared-objects-dir/Portfile	2012-01-13 14:15:08 UTC (rev 88856)
@@ -1,140 +0,0 @@
-# -*- coding: utf-8; mode: tcl; tab-width: 4; truncate-lines: t; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4
-# $Id$
-
-
-PortSystem          1.0
-
-name                mp-shared-objects
-version             0.0.2
-categories          devel
-platforms           darwin
-license             BEERWARE-42+
-maintainers         pixilla
-distfiles
-
-description         Use otool to show/verify shared objects.
-long_description    ${description}
-
-homepage            {}
-master_sites        {}
-extract.mkdir       yes
-use_configure       no
-build {
-    set fp [open ${worksrcpath}/${name} w]
-    puts $fp \
-{#!/usr/bin/env bash
-# Argument = [-q] <path name>
-
-eError="error: no such path"
-
-usage()
-{
-cat << EOF
-
-usage: $(basename $0) options
-
-This script runs otool -XL over the contents of a path:
-\$ $(basename $0) -p /opt/local/lib/mysql5
-or a MacPorts port name:
-\$ $(basename $0) -p mysql5 -m
-
-
-OPTIONS:
-    -h      Show this message
-    -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
-    -q      Quite, only print errors, implies -c
-    -s      Stop on errors
-
-EOF
-}
-
-[ -z $TYPE ] && TYPE=PATH
-[ -z $CHECK_EXISTS ] && CHECK_EXISTS=
-[ -z $QUITE ] && QUITE=
-[ -z $STOP ] && STOP=
-
-while getopts "hp:mcqs" OPTION
-do
-    case $OPTION in
-        h)
-            usage
-            exit 1
-            ;;
-        p)
-            NAME=$OPTARG
-            ;;
-        m)
-            TYPE=PORT
-            ;;
-        c)
-            CHECK_EXISTS=yes
-            ;;
-        q)
-            QUITE=yes
-            CHECK_EXISTS=yes
-            ;;
-        s)
-            STOP=yes
-            ;;
-        ?)
-            usage
-            exit
-            ;;
-    esac
-done
-
-if [[ -z $NAME ]]
-then
-    usage
-    exit 1
-fi
-
-IFS=$'\n'
-if [ "${TYPE}" == "PATH" ]
-then
-  FILES=( $(find "${NAME}" -type f) )
-fi
-if [ "${TYPE}" == "PORT" ]
-then
-  FILES=( $(port -q contents "${NAME}" | sed -e "s/^ *//") )
-fi
-for (( fc = 0 ; fc < ${#FILES[@]} ; fc++ ))
-do
-    if [[ ! -f "${FILES[$fc]}" && ! -d "${FILES[$fc]}" ]]
-    then
-        echo "FILE ${eError}: ${FILES[$fc]}"
-        break 1
-    fi
-    if [ ! -d "${FILES[$fc]}" ]
-    then    
-        SHAREDLIBRARYS=( $(otool -XL "${FILES[$fc]}" | sed -e "s/^Archive.*//" | tr -d '\t' | awk '{print $1}') )
-        if [[ ${#SHAREDLIBRARYS[@]} -gt 0 ]]
-        then
-            [ -z $QUITE ] && echo "${FILES[$fc]}"
-            for (( sc = 0 ; sc < ${#SHAREDLIBRARYS[@]} ; sc++ ))
-            do
-                if [ ! -f "${SHAREDLIBRARYS[$sc]}" ]
-                then
-                    [ -n $QUITE ] && echo "${FILE[$fc]}"
-                    echo "SHAREDLIBRARY ${eError}: ${SHAREDLIBRARYS[$sc]}"
-                    [ "${STOP}" == "yes" ] && break 2
-                else
-                    [ -z $QUITE ] && echo -e "\t${SHAREDLIBRARYS[$sc]}"
-                fi
-            done
-        fi
-    fi
-done
-unset IFS
-unset NAME
-unset CHECK_EXISTS
-unset QUITE
-    }
-    close $fp
-}
-destroot {
-    xinstall -m 755 -W ${filespath} mp-shared-objects \
-        ${destroot}${prefix}/sbin/
-}

Added: users/pixilla/scripts/mp-svn-propedit
===================================================================
--- users/pixilla/scripts/mp-svn-propedit	                        (rev 0)
+++ users/pixilla/scripts/mp-svn-propedit	2012-01-13 14:15:08 UTC (rev 88856)
@@ -0,0 +1,86 @@
+#!/bin/bash
+# Argument = [-q] <path name>
+
+usage()
+{
+cat << EOF
+
+usage: $(basename $0) options
+
+This script runs this command to edit svn commit messages:
+\$ svn propedit -r N --revprop svn:log URL
+where N is the revision number whose log message you wish to change, and URL 
+is the location of the repository. If you run this command from within a 
+working copy, you can leave off the URL.
+
+Example Usage:
+\$ $(basename $0) -r 79179 -u http://svn.macports.org/repository/macports/users/pixilla
+or
+\$ cd /opt/local/var/macports/sources/svn.macports.org/trunk/dports
+\$ $(basename $0) -r 79179 -e nano
+
+
+OPTIONS:
+    -h      Show this message.
+    -r      REVISION: number of svn log message to edit.
+    -u      URL: of svn repository.
+    -d      DIR: of svn repository.
+    -p      PORT: name. Will use "port file PORT" to get URL.
+    -e      Use this editor rather then your env editor. (your env editor is $EDITOR)
+
+EOF
+}
+
+[ -z $REVISION ] && REVISION=
+[ -z $URL ] && URL=
+[ -z $PORT ] && PORT=
+
+while getopts "hr:u:d:p:e" OPTION
+do
+#    echo "$OPTION" $OPTIND $OPTARG
+    case "${OPTION}" in
+        h)
+            usage
+            exit 1
+            ;;
+        r)
+            REVISION=$OPTARG
+            ;;
+        u)
+            URL=$OPTARG
+            ;;
+        d)
+            DIR=$OPTARG
+            ;;
+        p)
+            PORT=$OPTARG
+            ;;
+        e)
+            EDITOR=$OPTARG
+            ;;
+        ?)
+            usage
+            exit 1
+            ;;
+    esac
+done
+[[ ! -z $PORT && -z $DIR ]] && DIR=$(port file $PORT 2>/dev/null)
+[[ -z $DIR ]] && DIR=.
+[[ -z $URL ]] && URL=$(svn info "${DIR}" | grep ^URL: | awk '{print $2}')
+[[ -z $REVISION ]] && REVISION=$(svn info "${DIR}" | grep ^Revision: | awk '{print $2}')
+#echo $REVISION $PORT $DIR $URL ;exit 1
+if [[ -z $REVISION ]]
+then
+    echo "error: -r not set"
+    usage
+    exit 1
+fi
+
+if [[ -z $URL ]]
+then
+    echo "error: -u not set and you are not in an svn working copy"
+    usage
+    exit 1
+fi
+
+svn propedit -r "${REVISION}" --revprop svn:log "${URL}"


Property changes on: users/pixilla/scripts/mp-svn-propedit
___________________________________________________________________
Added: svn:executable
   + *

Added: users/pixilla/scripts/mp-trac-user-ports
===================================================================
--- users/pixilla/scripts/mp-trac-user-ports	                        (rev 0)
+++ users/pixilla/scripts/mp-trac-user-ports	2012-01-13 14:15:08 UTC (rev 88856)
@@ -0,0 +1,27 @@
+#!/bin/sh
+echo "||'''Port'''||'''Repository'''||'''Category'''||"; \
+for name in $(port echo "maintainer:(\W|^)$1(\W|$)"); do \
+    svn info $(port file $name) 2>&1 | \
+    grep -B 20 -E "^Revision" | \
+    grep -E "^URL:\ http://svn.macports.org/repository/macports/" | \
+    sed -e 's|^.*svn.macports.org/repository/macports/||' \
+        -e 's|/Portfile$||' | \
+    awk -v NAME=$name 'BEGIN \
+        { FS = "/" } ; \
+        { printf "||[source:"$0" "NAME"]||[source:" } ; \
+        { \
+            for (x=1; x<NF-1; x++) { \
+                printf "%s", $x ; \
+                if (x != NF-2) printf "/" \
+            } \
+        } ; \
+        { printf " "$(NF-3)"]||[source:" } ; \
+        { \
+            for (x=1; x<NF; x++) { \
+                printf "%s", $x ; \
+                if (x != NF-1) printf "/" \
+            } \
+        } ; \
+        { printf " "$(NF-1)"]||\n" } ; \
+        ' ; \
+done
\ No newline at end of file


Property changes on: users/pixilla/scripts/mp-trac-user-ports
___________________________________________________________________
Added: svn:executable
   + *
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120113/95cbcd8e/attachment.html>


More information about the macports-changes mailing list