Deal with unusual IFS settings in the shell scripts for linux standalone and OSX app.

Thanks, Yaroslav Halchenko
This commit is contained in:
Joey Hess 2020-07-24 14:46:50 -04:00
parent 3627f03996
commit 00c5f04f20
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
5 changed files with 30 additions and 0 deletions

View file

@ -11,6 +11,9 @@ git-annex (8.20200720.2) UNRELEASED; urgency=medium
* move, copy --to: Sped up seeking files by 2x. * move, copy --to: Sped up seeking files by 2x.
* drop: Sped up seeking files to drop by 2x, and also some performance * drop: Sped up seeking files to drop by 2x, and also some performance
improvements to checking numcopies. improvements to checking numcopies.
* Deal with unusual IFS settings in the shell scripts for linux
standalone and OSX app.
Thanks, Yaroslav Halchenko
-- Joey Hess <id@joeyh.name> Tue, 21 Jul 2020 12:58:30 -0400 -- Joey Hess <id@joeyh.name> Tue, 21 Jul 2020 12:58:30 -0400

View file

@ -24,3 +24,5 @@ most likely it is just a matter of sanitizing this variable in `runshell` or ali
[[!meta author=yoh]] [[!meta author=yoh]]
[[!tag projects/datalad]] [[!tag projects/datalad]]
> [[fixed|done]] --[[Joey]]

View file

@ -0,0 +1,9 @@
[[!comment format=mdwn
username="joey"
subject="""comment 3"""
date="2020-07-24T18:43:32Z"
content="""
Applied a version of the patch without the :- , although it seems the :- is
not a bashism after all. It still makes no sense to me unless there's some
other setting that might make the shell blow up when IFS isn't set.
"""]]

View file

@ -4,6 +4,9 @@
set -e set -e
orig_IFS="${IFS}"
unset IFS
os="$(uname -o 2>/dev/null || true)" os="$(uname -o 2>/dev/null || true)"
base="$(dirname "$0")" base="$(dirname "$0")"
@ -238,6 +241,11 @@ else
cmd=sh cmd=sh
fi fi
if [ -n "${orig_IFS}" ]; then
IFS="${orig_IFS}"
export IFS
fi
if [ -z "$tbase" ]; then if [ -z "$tbase" ]; then
if [ "$useproot" ]; then if [ "$useproot" ]; then
exec proot "$cmd" "$@" exec proot "$cmd" "$@"

View file

@ -4,6 +4,9 @@
set -e set -e
orig_IFS="${IFS}"
unset IFS
base="$(dirname "$0")" base="$(dirname "$0")"
if [ ! -d "$base" ]; then if [ ! -d "$base" ]; then
@ -85,6 +88,11 @@ export GIT_ANNEX_DIR
GIT_ANNEX_STANDLONE_ENV="PATH GIT_EXEC_PATH GIT_TEMPLATE_DIR" GIT_ANNEX_STANDLONE_ENV="PATH GIT_EXEC_PATH GIT_TEMPLATE_DIR"
export GIT_ANNEX_STANDLONE_ENV export GIT_ANNEX_STANDLONE_ENV
if [ -n "${orig_IFS}" ]; then
IFS="${orig_IFS}"
export IFS
fi
if [ "$1" ]; then if [ "$1" ]; then
cmd="$1" cmd="$1"
shift 1 shift 1