X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=blobdiff_plain;f=mkdeb.sh;h=4fd92019e3557435f2c8368380a2a76811fb7f7c;hb=c6f848650dccbecb05229e86c180bd7837872185;hp=55ef95efb435ae47aa013d52316dabe60d6dd0a2;hpb=cda5c93df1c5cfe6f22a41e35bc1719a824d1e63;p=selector.git diff --git a/mkdeb.sh b/mkdeb.sh index 55ef95e..4fd9201 100755 --- a/mkdeb.sh +++ b/mkdeb.sh @@ -1,8 +1,8 @@ #!/bin/bash # -# selector is a simple shell command for selection of strings with a -# dynamic pattern-matching. +# selector is a simple command line utility for selection of strings +# with a dynamic pattern-matching. # # Copyright (c) 2009 Francois Fleuret # Written by Francois Fleuret @@ -25,6 +25,8 @@ # This script creates the Debian package. The way it does it is # probably not very conventional. I am open to suggestions. +set -e + VERSION=1.0-R$(cat REVISION_NUMBER) PACKAGE=/tmp/selector_${VERSION}_i386.deb @@ -33,12 +35,16 @@ MAN_PATH="usr/share/man/man1" make -j -k || exit 1 +strip selector + TMP=`mktemp -d /tmp/deb.XXXXXX` for d in DEBIAN ${BIN_PATH} ${MAN_PATH}; do mkdir -p ${TMP}/${d} done +mkdir -p debian/control + LIB_DEPENDS=$(dpkg-shlibdeps -O ./selector | grep Depends | sed -e "s/^.*Depends=//") cat > ${TMP}/DEBIAN/control < Architecture: i386 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 substrings separated by ';', or a regexp, the display is - updated in real time to show only the matching lines. The main usage - of selector is as an efficient search in the shell command +Description: A command line utility for dynamic string-matching + This is a command line utility for dynamic string selection. As you + type a list of substrings separated by ';', or a regexp, the display + is updated in real time to show only the matching lines. 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 tty input buffer, hence allowing the user to edit the line - and execute it as a standard command. + into the tty input buffer, allowing the user to edit the line and + execute it as a standard command. EOF cp ./selector ${TMP}/${BIN_PATH}