Skip to content

Commit

Permalink
Fix firebird support on macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
shivammathur committed Jun 23, 2024
1 parent 6aa194d commit fe1628e
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions src/scripts/extensions/firebird.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
add_firebird_client_darwin() {
firebird_tag='R3_0_7'
pkg_name=$(get -s -n "" https://api.github.com/repos/FirebirdSQL/firebird/releases/tags/"$firebird_tag" | grep -Eo "Firebird-.*.pkg" | head -n 1)
[ -z "$pkg_name" ] && pkg_name=$(get -s -n "" https://github.com/FirebirdSQL/firebird/releases/expanded_assets/"$firebird_tag" | grep -Eo "Firebird-.*.pkg" | head -n 1)
get -q -e "/tmp/firebird.pkg" https://github.com/FirebirdSQL/firebird/releases/download/"$firebird_tag"/"$pkg_name"
sudo installer -pkg /tmp/firebird.pkg -target /
sudo mkdir -p /opt/firebird/include /opt/firebird/lib
sudo find /Library/Frameworks/Firebird.framework -name '*.h' -exec cp "{}" /opt/firebird/include \;
sudo find /Library/Frameworks/Firebird.framework -name '*.dylib' -exec cp "{}" /opt/firebird/lib \;
firebird_tag='v3.0.11'
arch="$(uname -m)"
arch_name="x64"
[[ "$arch" = "arm64" || "$arch" = "aarch64" ]] && arch_name="arm64"
pkg_name=$(get -s -n "" https://api.github.com/repos/FirebirdSQL/firebird/releases/tags/"$firebird_tag" | grep -Eo "Firebird-3.*.$arch_name.tar.gz" | head -n 1)
[ -z "$pkg_name" ] && pkg_name=$(get -s -n "" https://github.com/FirebirdSQL/firebird/releases/expanded_assets/"$firebird_tag" | grep -Eo "Firebird-3.*.$arch_name.tar.gz" | head -n 1)
get -q -e "/tmp/firebird.tar.gz" https://github.com/FirebirdSQL/firebird/releases/download/"$firebird_tag"/"$pkg_name"
sudo tar -xzf /tmp/firebird.tar.gz -C /opt
add_path "/opt/firebird/bin"
}

add_firebird_helper() {
Expand Down

0 comments on commit fe1628e

Please sign in to comment.