diff options
-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 . +} |