From 66851273ad2707dc42b918387d0248e32d88ae54 Mon Sep 17 00:00:00 2001 From: Ivan Davidov Date: Sun, 3 Dec 2017 01:19:11 +0200 Subject: [PATCH] Use local configuration (dialog). --- src/.config | 8 ++------ src/minimal_overlay/bundles/dialog/.config | 5 +++++ src/minimal_overlay/bundles/dialog/01_get.sh | 8 +++----- src/minimal_overlay/bundles/dialog/02_build.sh | 4 +++- src/minimal_overlay/bundles/dialog/bundle.sh | 2 -- 5 files changed, 13 insertions(+), 14 deletions(-) create mode 100644 src/minimal_overlay/bundles/dialog/.config diff --git a/src/.config b/src/.config index 14c032e07..33d913f2b 100644 --- a/src/.config +++ b/src/.config @@ -146,11 +146,7 @@ VIM_SOURCE_URL=https://github.com/vim/vim/archive/v8.0.1298.tar.gz # ZLIB_SOURCE_URL=http://zlib.net/zlib-1.2.11.tar.xz -# You can find the latest dialog source bundles here: -# -# http://invisible-island.net/dialog/ -# -DIALOG_SOURCE_URL=ftp://ftp.invisible-island.net/dialog/dialog-1.3-20170509.tgz + #################################################### # # @@ -250,7 +246,7 @@ OVERLAY_TYPE=folder # The default overlay bundles are 'dhcp' and 'mll_source'. # #OVERLAY_BUNDLES=dhcp,mll_source -OVERLAY_BUNDLES=dropbear +OVERLAY_BUNDLES=dialog # The location where the overlay bundle software will be stored. # diff --git a/src/minimal_overlay/bundles/dialog/.config b/src/minimal_overlay/bundles/dialog/.config new file mode 100644 index 000000000..d5a755d9d --- /dev/null +++ b/src/minimal_overlay/bundles/dialog/.config @@ -0,0 +1,5 @@ +# You can find the latest dialog source bundles here: +# +# http://invisible-island.net/dialog/ +# +DIALOG_SOURCE_URL=ftp://ftp.invisible-island.net/dialog/dialog-1.3-20170509.tgz diff --git a/src/minimal_overlay/bundles/dialog/01_get.sh b/src/minimal_overlay/bundles/dialog/01_get.sh index 3ae095bd7..d0c367094 100755 --- a/src/minimal_overlay/bundles/dialog/01_get.sh +++ b/src/minimal_overlay/bundles/dialog/01_get.sh @@ -4,15 +4,13 @@ set -e . ../../common.sh -# Grab everything after the '=' character. -DOWNLOAD_URL=$(grep -i DIALOG_SOURCE_URL $MAIN_SRC_DIR/.config | cut -f2 -d'=') +# Read the common configuration properties. +DOWNLOAD_URL=`read_property DIALOG_SOURCE_URL` +USE_LOCAL_SOURCE=`read_property USE_LOCAL_SOURCE` # Grab everything after the last '/' character. ARCHIVE_FILE=${DOWNLOAD_URL##*/} -# Read the 'USE_LOCAL_SOURCE' property from '.config' -USE_LOCAL_SOURCE="$(grep -i USE_LOCAL_SOURCE $MAIN_SRC_DIR/.config | cut -f2 -d'=')" - if [ "$USE_LOCAL_SOURCE" = "true" -a ! -f $MAIN_SRC_DIR/source/overlay/$ARCHIVE_FILE ] ; then echo "Source bundle $MAIN_SRC_DIR/source/overlay/$ARCHIVE_FILE is missing and will be downloaded." USE_LOCAL_SOURCE="false" diff --git a/src/minimal_overlay/bundles/dialog/02_build.sh b/src/minimal_overlay/bundles/dialog/02_build.sh index 027e752bc..af06f91d8 100755 --- a/src/minimal_overlay/bundles/dialog/02_build.sh +++ b/src/minimal_overlay/bundles/dialog/02_build.sh @@ -28,6 +28,8 @@ make -j $NUM_JOBS echo "Installing 'dialog'." make -j $NUM_JOBS install DESTDIR=$DEST_DIR +rm -rf $DEST_DIR/usr/lib $DEST_DIR/usr/share + echo "Reducing 'dialog' size." set +e strip -g $DEST_DIR/usr/bin/* @@ -35,7 +37,7 @@ set -e # With '--remove-destination' all possibly existing soft links in # '$OVERLAY_ROOTFS' will be overwritten correctly. -cp -r --remove-destination $DEST_DIR/usr/* \ +cp -r --remove-destination $DEST_DIR/usr \ $OVERLAY_ROOTFS echo "Bundle 'dialog' has been installed." diff --git a/src/minimal_overlay/bundles/dialog/bundle.sh b/src/minimal_overlay/bundles/dialog/bundle.sh index e132bc25f..cacf2e88b 100755 --- a/src/minimal_overlay/bundles/dialog/bundle.sh +++ b/src/minimal_overlay/bundles/dialog/bundle.sh @@ -2,8 +2,6 @@ set -e -. ../../common.sh - ./01_get.sh ./02_build.sh