summaryrefslogtreecommitdiffstats
path: root/cygwin-find-provides.sh
diff options
context:
space:
mode:
Diffstat (limited to 'cygwin-find-provides.sh')
-rwxr-xr-xcygwin-find-provides.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/cygwin-find-provides.sh b/cygwin-find-provides.sh
new file mode 100755
index 0000000..81fccf4
--- /dev/null
+++ b/cygwin-find-provides.sh
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+# This script reads filenames from STDIN and outputs any relevant provides
+# information that needs to be included in the package.
+
+if [ "$1" ]
+then
+ package_name="$1"
+fi
+
+[ -z "$OBJDUMP" ] && OBJDUMP=i686-pc-cygwin-objdump
+
+filelist=`sed "s/['\"]/\\\&/g"`
+
+dlls=$(echo $filelist | tr [:blank:] '\n' | grep '\.dll$')
+
+for f in $dlls; do
+ basename=`basename $f | tr [:upper:] [:lower:]`
+ echo "cygwin($basename)"
+done