Browse Source

fix: ``xargs`` would complain about ``LINE_MAX`` for some reason on some hosts.

hostresources
Valentin Lab 5 years ago
parent
commit
b9175ac09e
  1. 2
      Dockerfile
  2. 10
      bin/compose-core

2
Dockerfile

@ -13,7 +13,7 @@ ENV KAL_SHLIB_ARRAY_VERSION="0.2.0" \
KAL_SHLIB_CACHE_VERSION="0.0.1" \
KAL_SHLIB_CHARM_VERSION="0.4.1" \
KAL_SHLIB_CMDLINE_VERSION="0.0.5" \
KAL_SHLIB_COMMON_VERSION="0.4.13" \
KAL_SHLIB_COMMON_VERSION="0.4.14" \
KAL_SHLIB_CONFIG_VERSION="0.0.2" \
KAL_SHLIB_CORE_VERSION="0.7.0" \
KAL_SHLIB_FIREWALL_VERSION="0.2.0" \

10
bin/compose-core

@ -3058,7 +3058,7 @@ export -f get_volumes_for_container
is_volume_used() {
local volume="$1" container_id src dst
while read container_id; do
while read -r container_id; do
while read-0 src dst; do
[[ "$src" == "$volume"/* ]] && return 0
done < <(get_volumes_for_container "$container_id")
@ -3315,7 +3315,7 @@ get_master_services() {
fi
echo "$master_service"
loaded["$master_service"]=1
done | xargs printf "%s "
done | nspc
return "${PIPESTATUS[0]}"
}
export -f get_master_services
@ -3392,7 +3392,7 @@ get_docker_compose_usage() {
echo "$docker_compose_help_msg" |
grep -m 1 "^Usage:" -A 10000 |
egrep -m 1 "^\$" -B 10000 |
xargs printf "%s " |
nspc |
sed -r 's/^Usage: //g' |
tee "$cache_file" || return 1
}
@ -3486,13 +3486,13 @@ _MULTIOPTION_REGEX_LINE_FILTER=$_MULTIOPTION_REGEX'(\s|=)'
multi_opts_filter() {
egrep "$_MULTIOPTION_REGEX_LINE_FILTER" |
sed -r "s/^($_MULTIOPTION_REGEX)(\s|=).*$/\1/g" |
tr ',' "\n" | xargs printf "%s "
tr ',' "\n" | nspc
}
single_opts_filter() {
egrep -v "$_MULTIOPTION_REGEX_LINE_FILTER" |
tr ',' "\n" | xargs printf "%s "
tr ',' "\n" | nspc
}

Loading…
Cancel
Save