Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=xfcetesting.git;a=commitdiff;h=0dfabf20ee5cbcd5e285972db06e1cb682b39519

commit 0dfabf20ee5cbcd5e285972db06e1cb682b39519
Author: James Buren <[email protected]>
Date:   Mon Oct 1 02:44:51 2012 -0500

add tool for dumping the ABI of a single FPM in a tidy fashion

diff --git a/tools/dumpabi b/tools/dumpabi
new file mode 100755
index 0000000..bade33b
--- /dev/null
+++ b/tools/dumpabi
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+if [ -z "$1" ]; then
+       echo "Usage: $0 <fpm>"
+       exit 1
+fi
+
+export LC_ALL=C
+DIR="$(mktemp -td)"
+FPM="$1"
+IFS=$'\n'
+
+cd "$DIR"
+
+tar -xf "$FPM"
+
+rm -f .* 2> /dev/null
+
+chmod -R 0777 .
+
+for i in $(find . -type f); do
+       if file "$i" | grep -q 'ELF'; then
+               for j in $(readelf -d "$i" | sed -rn 's|.*Shared library: 
\[(.*)\].*|\1|p'); do
+                       echo "${i/.\//}: $j"
+               done
+       fi
+done
+
+rm -rf "$DIR"
_______________________________________________
Frugalware-git mailing list
[email protected]
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to