From 299b2aebfa5b9f128a8986c2690676e7654ef764 Mon Sep 17 00:00:00 2001 From: Ivan Davidov Date: Sat, 18 Nov 2017 18:02:29 +0200 Subject: [PATCH] 'glibc_full' is now built in directory with the same name. --- src/minimal_overlay/bundles/glibc_full/bundle.sh | 14 +++++++------- src/minimal_overlay/common.sh | 5 +++-- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/minimal_overlay/bundles/glibc_full/bundle.sh b/src/minimal_overlay/bundles/glibc_full/bundle.sh index 3d9010ccc..92aed01fa 100755 --- a/src/minimal_overlay/bundles/glibc_full/bundle.sh +++ b/src/minimal_overlay/bundles/glibc_full/bundle.sh @@ -10,19 +10,19 @@ if [ ! -d $SYSROOT ] ; then fi echo "Preparing the overlay glibc folder. This may take a while..." -rm -rf $WORK_DIR/overlay/glibc -mkdir -p $WORK_DIR/overlay/glibc/lib +rm -rf $WORK_DIR/overlay/$BUNDLE_NAME +mkdir -p $WORK_DIR/overlay/$BUNDLE_NAME/lib cd $SYSROOT -find . -type l -exec cp {} $WORK_DIR/overlay/glibc/lib \; +find . -type l -exec cp {} $WORK_DIR/overlay/$BUNDLE_NAME/lib \; echo "All libraries have been copied." -cd $WORK_DIR/overlay/glibc/lib +cd $WORK_DIR/overlay/$BUNDLE_NAME/lib -for FILE_DEL in $(ls *.so) +for FILE_DEL in `ls *.so` do - FILE_KEEP=$(ls $FILE_DEL.*) + FILE_KEEP=`ls $FILE_DEL.*` if [ ! "$FILE_KEEP" = "" ] ; then # We remove the shorter file and replace it with symbolic link. @@ -35,7 +35,7 @@ echo "Duplicate libraries have been replaced with soft links." strip -g * echo "All libraries have been optimized for size." -cp -r $WORK_DIR/overlay/glibc/lib $WORK_DIR/src/minimal_overlay/rootfs +cp -r $WORK_DIR/overlay/$BUNDLE_NAME/lib $WORK_DIR/src/minimal_overlay/rootfs echo "All GNU C libraries have been installed." diff --git a/src/minimal_overlay/common.sh b/src/minimal_overlay/common.sh index ec624b41c..cc56f07f0 100755 --- a/src/minimal_overlay/common.sh +++ b/src/minimal_overlay/common.sh @@ -2,9 +2,10 @@ # common code used by all bundles # should be included at the top of every *.sh file of each bundle -export MAIN_SRC_DIR=$(realpath --no-symlinks $PWD/../../../) +export MAIN_SRC_DIR=`realpath --no-symlinks $PWD/../../../` export WORK_DIR="$MAIN_SRC_DIR/work" -export SRC_DIR=$(pwd) +export SRC_DIR=`pwd` +export BUNDLE_NAME=`basename $SRC_DIR` export CONFIG="$MAIN_SRC_DIR/.config" export SYSROOT="$WORK_DIR/sysroot" export SYSROOT_SPECS="$WORK_DIR/sysroot.specs"