live-bootstrap/steps/improve/merged_usr.sh
MaxHearnden 4e2434b837 Support building within git repository
The lib directory for python modules conflicted with the symlinks for a
merged usr so this moves the directory out of the way
2024-09-10 16:31:03 +01:00

14 lines
461 B
Bash
Executable file

#!/bin/sh
# SPDX-FileCopyrightText: 2023 fosslinux <fosslinux@aussies.space>
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
# Add the rest of the FHS that we will use and is not created pre-boot
ln -s bin /usr/sbin
for d in bin lib sbin; do
if [ -d "/${d}" ] && ! [ -L "/${d}" ]; then
# Move the non symlink directory out of the way
mv "/${d}" "/${d}-saved"
fi
ln -s "usr/${d}" "/${d}" || true # these might exist if rerunning
done