Skip to content
Snippets Groups Projects
Commit 88631d69 authored by Joe Garcia's avatar Joe Garcia
Browse files

use while read instead of xargs for functions needing bash -c

parent 077b42bc
No related branches found
No related tags found
No related merge requests found
......@@ -15583,7 +15583,7 @@ fetch_pip_latest(){
# use pip to fetch latest versions of currently installed modules into src/fetched
mkdir -p src/fetched
( ${BASE}/bin/pip${PYFSVER} list -o | grep Current | sed s,\),,g | awk '{print $1 "==" $5}' \
| xargs ${BASE}/bin/pip${PYFSVER} install --no-binary :all: --download ${REALBASE}/src/fetched )
| xargs ${BASE}/bin/pip${PYFSVER} install --no-binary --all --download ${REALBASE}/src/fetched )
}
 
_list_addons(){
......@@ -15695,11 +15695,15 @@ allsrc_sorted(){
}
 
allpythonsrc(){
allsrc_sorted | xargs -I {} -n 1 bash -c '_echoIfPythonSrcPackage "$@"' _ {}
allsrc_sorted | while read x ; do
_echoIfPythonSrcPackage "$x"
done
}
 
allothersrc(){
allsrc_sorted | xargs -I {} -n 1 bash -c '_echoIfNotPythonSrcPackage "$@"' _ {}
allsrc_sorted | while read x ; do
_echoIfNotPythonSrcPackage "$x"
done
}
 
allsrcpkgs(){
......@@ -15744,13 +15748,13 @@ SPYTHON
echo FETCHING "$@"
if [ -e ${BASE}/bin/unearth ] ; then
echo Using SB3 UNEARTH
( unset http_proxy https_proxy ; ${BASE}/bin/unearth --no-binary :all: "$@" --all | ${PYTHON} ${TMPURL} | xargs -I {} -n 1 bash -c '_maybe_download "$@"' _ {} )
( unset http_proxy https_proxy ; ${BASE}/bin/unearth --no-binary "$@" --all | ${PYTHON} ${TMPURL} | while read x ; do _maybe_download "$x" ; done )
elif [ -e ~/bin/unearth ] ; then
echo USING System UNEARTH
( unset http_proxy https_proxy ; ~/bin/unearth --no-binary :all: "$@" --all | ${PYTHON} ${TMPURL} | xargs -I {} -n 1 bash -c '_maybe_download "$@"' _ {} )
( unset http_proxy https_proxy ; ~/bin/unearth --no-binary "$@" --all | ${PYTHON} ${TMPURL} | while read x ; do _maybe_download "$x" ; done )
else
echo USING PIP
( unset http_proxy https_proxy ; ${BASE}/bin/pip download --src `pwd`/src/autodownloaded --dest `pwd`/src/autodownloaded --no-binary :all: "$@" )
( unset http_proxy https_proxy ; ${BASE}/bin/pip download --src `pwd`/src/autodownloaded --dest `pwd`/src/autodownloaded --no-binary "$@" )
fi
 
rm ${TMPURL}
......@@ -15759,7 +15763,9 @@ export -f _fetch_pypi _maybe_download
 
pypi_getallsrc(){
mkdir -p src/autodownloaded 2>/dev/null
allsrcpkgs | xargs -I {} -n 1 bash -c '_fetch_pypi "$@"' _ {}
allsrcpkgs | while read x ; do
_fetch_pypi "$x"
done
}
 
allpkgversions(){
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment