diff options
author | cos <cos> | 2014-05-22 11:51:05 +0200 |
---|---|---|
committer | cos <cos> | 2014-05-22 11:56:17 +0200 |
commit | 17926a34038676f3fc7e4bef77410f8cbe14b835 (patch) | |
tree | 7cb1fb8a50ebafb553ddb1092346fd6d13f18dfd | |
parent | 0f2bb5ae1369d52dc7071e01b979485d687effae (diff) | |
download | go-webbrowser-launcher-17926a34038676f3fc7e4bef77410f8cbe14b835.zip |
Add a q&d debian package creation script.
-rwxr-xr-x | gen-package | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/gen-package b/gen-package new file mode 100755 index 0000000..bc4b937 --- /dev/null +++ b/gen-package @@ -0,0 +1,26 @@ +#!/bin/sh + +set -e + +CONTROL='Package: go-webbrowser-launcher +Version: 20140522-1 +Maintainer: cos <cos> +Description: Wrapper script to conveniently(sic?) launch web browsers. +Section: base +Priority: Optional +Essential: no +Architecture: all' + +version=`echo "$CONTROL"|sed --silent 's/^Version: //p'` +package=`echo "$CONTROL"|sed --silent 's/^Package: //p'` +builddir=`mktemp -d` +find . -name ${package}_${version}.deb| + grep ${package}_${version}.deb || +{ + mkdir --parent ${builddir}/${package}_${version}/DEBIAN/ + echo "$CONTROL" > ${builddir}/${package}_${version}/DEBIAN/control + mkdir --parent ${builddir}/${package}_${version}/usr/bin/ + cp go ${builddir}/${package}_${version}/usr/bin + ( cd ${builddir}; dpkg-deb --build ${package}_${version} ) + mv ${builddir}/${package}_${version}.deb . +} |