X-Git-Url: http://gitweb.hugovil.com/?a=blobdiff_plain;f=stage1%2Fcreate-symlinks;h=19fc73ab8ba5740c92bc575983e2e2ad53424559;hb=2d56e369dbc033f743dfcc0b392c844d6299937b;hp=cc91b573551530b52e725202b2706c43631a9e3c;hpb=6d3d50c17b24ef41f917f5776696eca810198092;p=hvlinux.git diff --git a/stage1/create-symlinks b/stage1/create-symlinks index cc91b57..19fc73a 100755 --- a/stage1/create-symlinks +++ b/stage1/create-symlinks @@ -1,17 +1,14 @@ -#!/bin/sh -set -o errexit +#!/bin/bash -# Reading system configuration informations, functions and package versions. -source ../sysinfos -source ../functions -source ../packages-list +source ../functions/main # Some programs hard-wire paths to programs which don't exist yet. In order to # satisfy these programs, we create a number of symbolic links which will be # replaced by real files when we're installing all the software. -# We must not use "-sf" to force the creation of a symlink, because we don't want -# to write over a valid program if the install script needs to be re-started. +# We must not use "-sf" to force the creation of a symlink, because we don't +# want to write over a valid program if the install script needs to be +# re-started. source=/tools/bin target=${LFS}/bin @@ -21,12 +18,14 @@ for link in ${source}/{bash,cat,echo,grep,pwd,sleep,stty}; do fi done +# 'env' symlink is for glib source=/tools/bin target=${LFS}/usr/bin -link=${source}/file -if [ ! -L ${target}/$(basename ${link}) ]; then - ln -sv ${link} ${target} -fi +for link in ${source}/{env,file}; do + if [ ! -L ${target}/$(basename ${link}) ]; then + ln -sv ${link} ${target} + fi +done source=/tools/lib target=${LFS}/usr/lib