1 # Build script for the filesystem layout (Dragora).
3 # Copyright (c) 2014-2017 Matias Fonzo, <selk@dragora.org>.
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
9 # http://www.apache.org/licenses/LICENSE-2.0
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
17 # These steps here are to satisfy "13-symlinks", the complete
18 # steps are done from "recipes/config/hierarchyfs".
20 echo "Creating minimal structure of directories for 'rootdir' ..."
22 mkdir -p -- "${rootdir}/usr/bin" "${rootdir}/etc" "${rootdir}/var/log"
28 # Handle lib<equal> directory for the multi directory support
29 if test -n "$libSuffix"
31 echo "Handling lib<equal> for ${rootdir}/usr/lib${libSuffix} ..."
33 cd -- "${rootdir}"/usr
34 mkdir -p lib${libSuffix}
35 ln -s -f lib${libSuffix} lib
38 # Make symlink of compatibility for / at $rootdir
41 ln -s usr/lib${libSuffix} lib
43 echo "Making compatibility for ${rootdir}/tools/lib${libSuffix} ..."
45 mkdir -p lib${libSuffix}
46 ln -s -f lib${libSuffix} lib
48 mkdir -p -- "${rootdir}/lib" "${rootdir}/tools/lib" "${rootdir}/usr/lib"
51 # Save the value of 'libSuffix'
53 if test -n "$libSuffix"
56 echo "$libSuffix" > /tools/etc/stage1_is-multi-directory