debian/rules: Use `git' potty wrapper.
[qmail] / debian / debianize-binary-tree
CommitLineData
9312c29d
MW
1#!/bin/bash
2
3set -e
4
5function startofpath() {
bcb3f3eb 6 if [ -f usr/share/man/man8/`basename $1`.8 ]; then
9312c29d 7 echo usr/sbin
bcb3f3eb 8 elif [ -f usr/share/man/man1/`basename $1`.1 ]; then
9312c29d
MW
9 echo usr/bin
10 else
11 case `basename $1` in
12 elq|pinq|qail|qlist2) echo usr/bin;;
13 datemail|predate|qmail-home|qsmhook|sendmail) echo usr/sbin;;
14 *) echo 1>&2 Cannot determine if $1 belongs in sbin or bin;exit 2;;
15 esac
16 fi
17}
18
19test -d debian/tmp || (echo "Could not find debian/tmp directory.";exit 1)
20
21cd debian/tmp
22
23for f in var/qmail/bin/*; do
24 mv $f `startofpath $f`
25done
26
27rmdir var/qmail/bin || ( echo "Could not remove qmail/bin directory!"; exit 3)