[arch-dev-public] [PATCH 3/3] Allow namcap to run without being installed

Dan McGee dan at archlinux.org
Sun Feb 27 12:25:41 EST 2011


We regressed when splitting the package parser into two scripts; add a
variable to configure the path it is found on and add a 'namcap-devel'
script that allows running the whole deal from the current git checkout.

Signed-off-by: Dan McGee <dan at archlinux.org>
---
 namcap-devel  |    9 +++++++++
 parsepkgbuild |    3 ++-
 2 files changed, 11 insertions(+), 1 deletions(-)
 create mode 100755 namcap-devel

diff --git a/namcap-devel b/namcap-devel
new file mode 100755
index 0000000..8619a67
--- /dev/null
+++ b/namcap-devel
@@ -0,0 +1,9 @@
+#!/bin/sh
+PATH="$(pwd):$PATH"
+PARSE_PKGBUILD_PATH="$(pwd)"
+export PARSE_PKGBUILD_PATH
+
+PYTHONPATH="$(pwd)"
+export PYTHONPATH
+
+./namcap -t namcap-tags $@
diff --git a/parsepkgbuild b/parsepkgbuild
index 28fde8e..8f0f67d 100755
--- a/parsepkgbuild
+++ b/parsepkgbuild
@@ -6,6 +6,7 @@ source /etc/makepkg.conf
 export CARCH
 
 export PATH=/tmp/parsepkgbuild
+PARSE_PKGBUILD_PATH=${PARSE_PKGBUILD_PATH:-/usr/share/namcap}
 
-exec /bin/bash --noprofile --norc -r /usr/share/namcap/parsepkgbuild.sh $1
+exec /bin/bash --noprofile --norc -r "$PARSE_PKGBUILD_PATH"/parsepkgbuild.sh $1
 
-- 
1.7.4.1



More information about the arch-dev-public mailing list