diff --git a/patches/wxwidgets-3.0.2_macosx_yosemite.patch b/patches/wxwidgets-3.0.2_macosx_yosemite.patch index 1746d228bb..30e2587bee 100644 --- a/patches/wxwidgets-3.0.2_macosx_yosemite.patch +++ b/patches/wxwidgets-3.0.2_macosx_yosemite.patch @@ -1,31 +1,10 @@ -=== modified file 'patches/wxwidgets-3.0.2_macosx_yosemite.patch' ---- patches/wxwidgets-3.0.2_macosx_yosemite.patch 2014-11-04 19:24:22 +0000 -+++ patches/wxwidgets-3.0.2_macosx_yosemite.patch 2014-11-12 01:54:50 +0000 -@@ -1,15 +1,11 @@ --=== added file 'patches/wxwidgets-3.0.2_macosx_yosemite_webview_webkit.mm.patch' ----- patches/wxwidgets-3.0.2_macosx_yosemite_webview_webkit.mm.patch 1970-01-01 00:00:00 +0000 --+++ patches/wxwidgets-3.0.2_macosx_yosemite_webview_webkit.mm.patch 2014-10-29 18:17:55 +0000 --@@ -0,0 +1,11 @@ --+--- src/osx/webview_webkit.mm.orig 2014-09-16 07:27:52.000000000 -0600 --++++ src/osx/webview_webkit.mm 2014-09-16 07:28:12.000000000 -0600 --+@@ -28,7 +28,7 @@ --+ #include "wx/hashmap.h" --+ #include "wx/filesys.h" --+ --+-#include --++#include --+ #include --+ #include --+ -+--- src/osx/webview_webkit.mm.orig 2014-09-16 07:27:52.000000000 -0600 -++++ src/osx/webview_webkit.mm 2014-09-16 07:28:12.000000000 -0600 -+@@ -28,7 +28,7 @@ -+ #include "wx/hashmap.h" -+ #include "wx/filesys.h" -+ -+-#include -++#include -+ #include -+ #include -+ +--- src/osx/webview_webkit.mm.orig 2014-09-16 07:27:52.000000000 -0600 ++++ src/osx/webview_webkit.mm 2014-09-16 07:28:12.000000000 -0600 +@@ -28,7 +28,7 @@ + #include "wx/hashmap.h" + #include "wx/filesys.h" +-#include ++#include + #include + #include diff --git a/scripts/library-repos-install.sh b/scripts/library-repos-install.sh index aa129d3c8b..b02e7d2d54 100755 --- a/scripts/library-repos-install.sh +++ b/scripts/library-repos-install.sh @@ -70,7 +70,9 @@ install_prerequisites() sed else echo - echo "Incompatible System. Neither 'yum' nor 'apt-get' found. Not possible to continue." + echo "Incompatible System. Neither 'yum' nor 'apt-get' found. Not possible to" + echo "continue. Please make sure to install git, curl, and sed before using this" + echo "script." echo exit 1 fi @@ -107,11 +109,23 @@ cmake_uninstall() detect_pretty_repos() { + # Check for the correct option to enable extended regular expressions in + # sed. This is '-r' for GNU sed and '-E' for (older) BSD-like sed, as on + # Mac OSX. + if [ $(echo | sed -r '' &>/dev/null; echo $?) -eq 0 ]; then + SED_EREGEXP="-r" + elif [ $(echo | sed -E '' &>/dev/null; echo $?) -eq 0 ]; then + SED_EREGEXP="-E" + else + echo "Your sed command does not support extended regular expressions. Cannot continue." + exit 1 + fi + # Use github API to list repos for org KiCad, then subset the JSON reply for only # *.pretty repos PRETTY_REPOS=`curl https://api.github.com/orgs/KiCad/repos?per_page=2000 2> /dev/null \ | grep full_name | grep pretty \ - | sed -r 's:.+ "KiCad/(.+)",:\1:'` + | sed $SED_EREGEXP 's:.+ "KiCad/(.+)",:\1:'` #echo "PRETTY_REPOS:$PRETTY_REPOS"