diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2017-04-16 06:50:58 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2017-04-16 06:50:58 +0300 |
commit | b865ceec9035f6b7b4b22a494d3f4c0d8ec31018 (patch) | |
tree | 31d1a8e29fc3ea1382428d7c16544458a423c6b4 | |
parent | refactoring (diff) | |
download | windows-tmp-b865ceec9035f6b7b4b22a494d3f4c0d8ec31018.tar.gz windows-tmp-b865ceec9035f6b7b4b22a494d3f4c0d8ec31018.zip |
It allows to safely split a string.
Diffstat (limited to '')
-rwxr-xr-x | fix_nt_symbol_path.sh | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fix_nt_symbol_path.sh b/fix_nt_symbol_path.sh index 92e1de0..253513b 100755 --- a/fix_nt_symbol_path.sh +++ b/fix_nt_symbol_path.sh @@ -56,6 +56,8 @@ path_contains() { local -a env_paths local env_path + # Thanks to this guy for this trick: + # http://stackoverflow.com/a/24426608/514684 IFS="$path_separator" read -a env_paths -d '' -r < <( printf -- "%s$path_separator\\0" "$env_value" ) for env_path in ${env_paths[@]+"${env_paths[@]}"}; do |