1 # Build script for the filesystem layout (Dragora).
3 # Copyright (c) 2014-2018 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' ..."
23 "${rootdir}/tmp" "${rootdir}/usr/bin" "${rootdir}/etc" "${rootdir}/var/log"
30 # Handle lib<equal> directory for the multi directory support
31 if test -n "$libSuffix"
33 echo "Handling lib<equal> for ${rootdir}/usr/lib${libSuffix} ..."
35 cd -- "${rootdir}"/usr
36 mkdir -p lib${libSuffix}
37 ln -s -f lib${libSuffix} lib
40 # Make symlink of compatibility for / at $rootdir
43 ln -s usr/lib${libSuffix} lib
45 echo "Making compatibility for ${rootdir}/tools/lib${libSuffix} ..."
47 mkdir -p lib${libSuffix}
48 ln -s -f lib${libSuffix} lib
50 mkdir -p -- "${rootdir}/lib" "${rootdir}/tools/lib" "${rootdir}/usr/lib"
53 # Save the value of 'libSuffix'
55 if test -n "$libSuffix"
58 echo "$libSuffix" > /tools/etc/stage1_is-multi-directory