-
Notifications
You must be signed in to change notification settings - Fork 1
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
fix(buildlibs.sh): Small changes to the buildlibs.sh script to provide macOS compatibility #110
Merged
Merged
Changes from 3 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
b73be03
fix(buildlibs.sh) tweak sed syntax to work with gnu & BSD sed version…
MyNameIsMeerkat 862968e
fix(buildlibs.sh) provide default value to construct to avoid macos …
MyNameIsMeerkat 88c7e17
fix(buildlibs.sh): older versiona of macOS don't support -o switch fo…
MyNameIsMeerkat ed66e32
fix(buildlibs.sh) remove usage of sed and revert to using specified C…
MyNameIsMeerkat 4d94fd3
fix(buildlibs.sh) end of line whitespace removal 🤦
MyNameIsMeerkat 655b30a
Merge branch 'main' into mynameismeerkat/buildlib_macos_fix
MyNameIsMeerkat 3fc3856
Changed the way that a lack of an argument is handled.
viega 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 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 |
---|---|---|
@@ -1,10 +1,14 @@ | ||
#!/bin/bash | ||
OS=$(uname -o 2>/dev/null) | ||
if [[ ${?} != 0 ]] ; then | ||
# Older macOS/OSX versions of uname don't support -o | ||
OS=$(uname -s) | ||
fi | ||
|
||
set -eEu | ||
set -o pipefail | ||
|
||
ARCH=$(uname -m) | ||
OS=$(uname -o) | ||
|
||
if [[ ${ARCH} = "x86_64" ]] ; then | ||
NIMARCH=amd64 | ||
|
@@ -21,8 +25,7 @@ else | |
fi | ||
|
||
DEPS_DIR=${DEPS_DIR:-${HOME}/.local/c0} | ||
|
||
PKG_LIBS=${1}/lib/${OS}-${NIMARCH} | ||
PKG_LIBS=${1:-"./files/deps"}/lib/${OS}-${NIMARCH} | ||
MY_LIBS=${DEPS_DIR}/libs | ||
SRC_DIR=${DEPS_DIR}/src | ||
MUSL_DIR=${DEPS_DIR}/musl | ||
|
@@ -223,7 +226,8 @@ function ensure_gumbo { | |
if ! copy_from_package libgumbo.a ; then | ||
ensure_musl | ||
get_src sigil-gumbo https://github.com/Sigil-Ebook/sigil-gumbo/ | ||
sed -i '/examples/d' CMake* | ||
sed -i.bakconf4mbak '/examples/d' CMake* | ||
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. Assume this is some leftover stuff? |
||
rm *.bakconf4mbak | ||
colorln CYAN "Cooking up some gumbo" | ||
mkdir build | ||
cd build | ||
|
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.
I'm not a huge fan of the default string I have provided here but not sure what would be better. V open to suggestions
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.
I'd rather blow up if the variable isn't provided, if we actually need to do something here. Generally, nobody should need to run this manually.