]> git.ipfire.org Git - people/stevee/pakfire.git/blob - src/quality-agent/095-directory-layout
Cleanup database and add indexes.
[people/stevee/pakfire.git] / src / quality-agent / 095-directory-layout
1 #!/bin/bash
2
3 . $(dirname ${0})/qa-include
4
5 DESC="The filelayout should comply to the FHS."
6
7 DIRS="/etc/init.d /etc/rc.d /lib/pkgconfig /usr/etc /usr/libexec /usr/local /usr/man /usr/usr /usr/var ${BUILDROOT}"
8
9 function check() {
10 # Do nothing, if directory check was disabled.
11 if [ "${QUALITY_AGENT_NO_DIRECTORY_CHECK}" = "yes" ]; then
12 return 0
13 fi
14
15 local failed=0
16
17 local dir
18 for dir in ${DIRS}; do
19 if [ -d "${BUILDROOT}${dir}" ]; then
20 log_error "Bad directory: ${dir}"
21 failed=1
22 fi
23 done
24
25 return ${failed}
26 }
27
28 run