summaryrefslogtreecommitdiffstats
path: root/remote/setup_target
diff options
context:
space:
mode:
Diffstat (limited to 'remote/setup_target')
-rwxr-xr-xremote/setup_target11
1 files changed, 9 insertions, 2 deletions
diff --git a/remote/setup_target b/remote/setup_target
index f0722055..60cf23b5 100755
--- a/remote/setup_target
+++ b/remote/setup_target
@@ -151,10 +151,17 @@ copy_files_with_deps () {
COPYFILES_LIST="list_wanted_stage3.2"
[ -e "${COPYFILES_LIST}" ] && rm "${COPYFILES_LIST}"
-
+
[ ! -z "${REQUIRED_BINARIES}" ] && pinfo "Gathering required binaries from config file..."
+ local OPTIONAL
for FILENAME in ${REQUIRED_BINARIES}
do
+ if [[ "$FILENAME" == @* ]]; then
+ OPTIONAL="yes"
+ FILENAME=$(echo "$FILENAME" | cut -c 2- )
+ else
+ OPTIONAL="no"
+ fi
local FILE_CANDIDATES=$( find . -name "${FILENAME}" -a \( -type f -o -type l \) )
# only do if more than one candidate found
if [ "$(echo $FILE_CANDIDATES | wc -w)" -gt 1 ]; then
@@ -175,7 +182,7 @@ copy_files_with_deps () {
else
pdebug "\tFound ${FILENAME} at ${FILE}"
fi
- elif [ "$(echo $FILE_CANDIDATES | wc -w)" -eq 0 ]; then
+ elif [ "$OPTIONAL" == "no" -a "$(echo $FILE_CANDIDATES | wc -w)" -eq 0 ]; then
perror "Could not find required binary $FILENAME"
else
# one candidate