Repository navigation
OS X Installer Fixes #1629
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
umar456
merged 5 commits into
arrayfire:hotfix-3.4.2
from
shehzan10:osx-installer-fixes
Oct 25, 2016
Merged
OS X Installer Fixes #1629
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
358f6dc
Fix Forge shared files being installer directly in /usr/local
shehzan10 65bff6a
OSX post install script needs to be executable
shehzan10 40840b3
Fixes to postinstall script for OSX installer
shehzan10 b75962c
Major OSX Installer Fix: Libraries were being deep copied and not sym…
shehzan10 2ade7fc
More verbose post install script. Fix failures due to grep not found
shehzan10 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,13 +14,16 @@ if [ ! -f $brew ]; then | |
| exit 1 | ||
| fi | ||
|
|
||
| user=$(ps aux | grep console | grep -v 'grep\|root' | cut -d' ' -f1 | head -n1) | ||
| #user=$(ps aux | grep console | grep -v 'grep\|root' | cut -d' ' -f1 | head -n1) | ||
| user=$(stat -f '%Su' $HOME) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 |
||
|
|
||
| if [ -z $user ]; then | ||
| echo "User not found" >> $err_file | ||
| exit 1 | ||
| fi | ||
|
|
||
| echo "User: ${user}" >> $err_file | ||
|
|
||
| function deps_err | ||
| { | ||
| osascript -e 'tell app "Installer" to display dialog "ArrayFire files installed but failed to install ArrayFire/Forge dependencies using Brew."' | ||
|
|
@@ -30,5 +33,34 @@ function deps_err | |
| exit 1 | ||
| } | ||
|
|
||
| su $user -c "$brew tap homebrew/versions" >> $err_file 2>&1 | ||
| su $user -c "$brew install glfw3 fontconfig" >> $err_file 2>&1 || deps_err | ||
| echo "Output of brew tap:" >> $err_file | ||
| echo "-------------------" >> $err_file | ||
| su $user -c "$brew tap" >> $err_file | ||
| echo "-------------------" >> $err_file | ||
|
|
||
| BREW_VERSIONS=$(su $user -c "$brew tap" | grep "homebrew/versions") || true | ||
| if [[ -z "${BREW_VERSIONS}" ]]; then | ||
| su $user -c "$brew tap homebrew/versions" >> $err_file 2>&1 | ||
| else | ||
| echo "Homebrew/Versions already present in brew tap." >> $err_file | ||
| fi | ||
|
|
||
| GLFW_INSTALLED=$(su $user -c "$brew ls --versions glfw3" | grep "glfw3") || true | ||
| if [[ -z "${GLFW_INSTALLED}" ]]; then | ||
| echo "Installing GLFW3" >> $err_file | ||
| echo "-------------------" >> $err_file | ||
| su $user -c "$brew install glfw3" >> $err_file 2>&1 || deps_err | ||
| echo "-------------------" >> $err_file | ||
| else | ||
| echo "GLFW Version ${GLFW_INSTALLED} is already installed." >> $err_file | ||
| fi | ||
|
|
||
| FTCG_INSTALLED=$(su $user -c "$brew ls --versions fontconfig" | grep "fontconfig") || true | ||
| if [[ -z "${FTCG_INSTALLED}" ]]; then | ||
| echo "Installing FontConfig" >> $err_file | ||
| echo "-------------------" >> $err_file | ||
| su $user -c "$brew install fontconfig" >> $err_file 2>&1 || deps_err | ||
| echo "-------------------" >> $err_file | ||
| else | ||
| echo "FontConfig Version ${FTCG_INSTALLED} is already installed." >> $err_file | ||
| fi | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't look right. Was it really installing the libraries in the /usr/local directory? I don't see a change in the PKG_BUILD function that is associated with this change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shehzan10 clarified that this is indeed correct.