cgit: Added cgit 0.7.3-c502865 - A CGI for git written in C
[opensde-package-nopast.git] / base / fhs / fhs.conf
blobe19fdc45573f36e0e16e0f6ea720b66b41499ffe
1 # --- SDE-COPYRIGHT-NOTE-BEGIN ---
2 # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
4 # Filename: package/.../fhs/fhs.conf
5 # Copyright (C) 2006 The OpenSDE Project
7 # More information can be found in the files COPYING and README.
9 # This program is free software; you can redistribute it and/or modify
10 # it under the terms of the GNU General Public License as published by
11 # the Free Software Foundation; version 2 of the License. A copy of the
12 # GNU General Public License can be found in the file COPYING.
13 # --- SDE-COPYRIGHT-NOTE-END ---
15 srctar=none
16 createprefix=0
17 createdocs=0
18 check_usrlocal=0
20 makeopt=
21 makeinstopt=
23 fhs_create_helper() {
24         while read cmd name attribute; do
25                 if [ -e "$sysroot/$name" ]; then
26                         echo "Skipping: $name"
27                         # continue
28                 elif [ "$cmd" == "m" ]; then
29                         echo "Creating: $name"
30                         mkdir "$sysroot/$name"
31                         [ -z "$attribute" ] ||
32                                 chmod "$attribute" "$sysroot/$name"
33                 elif [ "$cmd" == "l" -a -n "$attribute" ]; then
34                         echo "Symlinking: $name -> $attribute"
35                         ln -s "$attribute" "$sysroot/$name"
36                 else
37                         echo_error "Syntax Error: $cmd $name $attribute"
38                         false
39                 fi
40                 add_flist "$sysroot/$name"
41         done
44 fhsfiles="$( ls $confdir/fhs-*.{txt,sh} 2> /dev/null | sort )"
46 fhs_create() {
47         local file=
49         for file in $fhsfiles; do
50                 case "$file" in
51                         *.sh)   echo "loading $file..." 1>&2
52                                 sh $file ;;
53                         *.txt)  echo "loading $file..." 1>&2
54                                 sed -e '/^[ \t]*$/d;' -e '/^#/d;' $file ;;
55                 esac | fhs_create_helper
56         done
59 hook_add postmake 5 fhs_create
61 hook_add postdoc 7 "mkdir -p $root$docdir/; cp -vf $( match_source_file -p fhs ) $root$docdir/"