From b1548a965491fe5827d341c21e6dd946b9346c10 Mon Sep 17 00:00:00 2001 From: Krzysztof Wicher Date: Mon, 21 Mar 2016 16:31:17 -0700 Subject: [PATCH] fix grep to work on OSX --- scripts/obtain/install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/obtain/install.sh b/scripts/obtain/install.sh index 3e97ea765..ee1949559 100755 --- a/scripts/obtain/install.sh +++ b/scripts/obtain/install.sh @@ -424,9 +424,9 @@ extract_dotnet_package() { local failed=false tar -xzf "$zip_path" -C "$temp_out_path" > /dev/null || failed=true - local folders_with_version_regex='^.*/\d+\.\d+[^/]+/' - find $temp_out_path -type f | grep -Po $folders_with_version_regex | copy_files_or_dirs_from_list $temp_out_path $out_path false - find $temp_out_path -type f | grep -Pv $folders_with_version_regex | copy_files_or_dirs_from_list $temp_out_path $out_path true + local folders_with_version_regex='^.*/[0-9]+\.[0-9]+[^/]+/' + find $temp_out_path -type f | grep -Eo $folders_with_version_regex | copy_files_or_dirs_from_list $temp_out_path $out_path false + find $temp_out_path -type f | grep -Ev $folders_with_version_regex | copy_files_or_dirs_from_list $temp_out_path $out_path true rm -rf $temp_out_path