diff options
author | davidovski <david@davidovski.xyz> | 2023-01-14 22:45:11 +0000 |
---|---|---|
committer | davidovski <david@davidovski.xyz> | 2023-01-14 22:45:11 +0000 |
commit | 6d05aeed3a6ee0e9443838e5ba85dee76e0b9e37 (patch) | |
tree | 8c2bcbfed5470832f37f68ea6cf9692a0f62a0b2 /src | |
parent | 9019894c1db1a36941c66cfd1a3a557103b7495e (diff) |
Allow no deps for building
Diffstat (limited to 'src')
-rw-r--r-- | src/build.sh | 27 | ||||
-rw-r--r-- | src/install.sh | 2 | ||||
-rw-r--r-- | src/util.sh | 2 |
3 files changed, 17 insertions, 14 deletions
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' ] } |