X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=blobdiff_plain;f=mkdeb.sh;h=dff4880469e6ce5342df09d012e897fdf5251575;hb=c3973ff66bfb73b40d030fd8fb682007d0d05d5c;hp=415678b2231dc43d347dc2819bcb5d805dfed538;hpb=bfd4b0ba81b348e616290deadccd9fa563879126;p=selector.git diff --git a/mkdeb.sh b/mkdeb.sh index 415678b..dff4880 100755 --- a/mkdeb.sh +++ b/mkdeb.sh @@ -1,7 +1,5 @@ #!/bin/bash -# Depends: ${shlibs:Depends} - # # selector is a simple shell command for selection of strings with a # dynamic pattern-matching. @@ -27,7 +25,9 @@ # This script creates the Debian package. The way it does it is # probably not very conventional. I am open to suggestions. -VERSION=1.0 +# Depends: ${shlibs:Depends} + +VERSION=1.0-R`git log|grep ^commit|wc -l` PACKAGE=/tmp/selector_${VERSION}_i386.deb make -k @@ -38,19 +38,18 @@ for d in DEBIAN usr/bin usr/share/man/man1; do mkdir -p ${TMP}/${d} done -# LIBS=`ldd selector | grep "=> /" | awk '{print $3}'` -# DEPS=`for l in ${LIBS}; do dpkg -S $l; done | cut -f 1 -d: | sort | uniq` +LIB_DEPENDS=$(dpkg-shlibdeps -O ./selector|grep Depends|sed -e "s/^.*Depends=//") cat > ${TMP}/DEBIAN/control < Architecture: i386 -Depends: libncurses5, libstdc++6, libc6, libgcc1 +Depends: ${LIB_DEPENDS} Description: A command line for dynamic string-matching. This is a command line for dynamic string selection. As you type a - list of strings separated by ';', the display is updated in real time - to show only the lines containing all the said strings. The main + list of strings separated by ';' or a regexp, the display is updated + in real time to show only the lines with matching content. The main usage of selector is as an efficient search in the shell command history. With the correct option, it will inject the selected line into the virtual tty input buffer, hence allowing the user to edit