From 6d05aeed3a6ee0e9443838e5ba85dee76e0b9e37 Mon Sep 17 00:00:00 2001 From: davidovski Date: Sat, 14 Jan 2023 22:45:11 +0000 Subject: Allow no deps for building --- src/build.sh | 27 +++++++++++++++------------ src/install.sh | 2 +- src/util.sh | 2 +- 3 files changed, 17 insertions(+), 14 deletions(-) (limited to 'src') diff --git a/src/build.sh b/src/build.sh index 614924b..664e8e7 100644 --- a/src/build.sh +++ b/src/build.sh @@ -26,18 +26,21 @@ get_deps () { build_order () { checked="" - while [ "$#" != "0" ]; do - name=$1 - shift - for dep in $(get_deps $name); do - [ -z "${checked##*$name*}" ] && { - checked="$checked $name" - set -- $@ $dep - echo $name $dep - ${VERBOSE} && echo "checking $name" 1>&2 - } - done - done | tsort | reverse_lines + ${RESOLVE_DEPS} && { + while [ "$#" != "0" ]; do + name=$1 + shift + for dep in $(get_deps $name); do + [ -z "${checked##*$name*}" ] && { + checked="$checked $name" + set -- $@ $dep + echo $name $dep + ${VERBOSE} && echo "checking $name" 1>&2 + } + done + done | tsort | reverse_lines + + } || echo $@ } # get the revision hash of a given builddir diff --git a/src/install.sh b/src/install.sh index 5d3c2e7..6f5503c 100644 --- a/src/install.sh +++ b/src/install.sh @@ -22,7 +22,7 @@ install_package () { [ ! -d $installed_dir ] && mkdir -p "$installed_dir" [ -f "$files" ] && { - for read -r file; do + while read -r file; do [ -z "${file%%/etc*}" ] || rm -f ${SYSROOT}$file done < $files diff --git a/src/util.sh b/src/util.sh index 871fe2a..6a2dfe9 100644 --- a/src/util.sh +++ b/src/util.sh @@ -91,7 +91,7 @@ wait_for_extract () { prompt_question () { $NOCONFIRM && return 0 printf "$1 [Y/n] " - read response + read var [ "${var%${var#?}}"x != 'nx' ] } -- cgit v1.2.1