Commit | Line | Data |
---|---|---|
9312c29d MW |
1 | #!/bin/bash |
2 | ||
3 | set -e | |
4 | ||
5 | function 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 | ||
19 | test -d debian/tmp || (echo "Could not find debian/tmp directory.";exit 1) | |
20 | ||
21 | cd debian/tmp | |
22 | ||
23 | for f in var/qmail/bin/*; do | |
24 | mv $f `startofpath $f` | |
25 | done | |
26 | ||
27 | rmdir var/qmail/bin || ( echo "Could not remove qmail/bin directory!"; exit 3) |