-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinstall_macos.sh
More file actions
30 lines (21 loc) · 777 Bytes
/
install_macos.sh
File metadata and controls
30 lines (21 loc) · 777 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/bash
set -e # Exit immediately if a command exits with a non-zero status
INSTALL_DIR="/tmp/basic_math_operations_install"
ZIP_URL="https://github.com/avighnac/basic_math_operations/releases/latest/download/libbasic_math_operations-macos-x86_64.zip"
ZIP_FILE="basic_math_operations.zip"
# Create a temporary directory
mkdir -p "$INSTALL_DIR"
cd "$INSTALL_DIR"
# Download the zip file
curl -L -o "$ZIP_FILE" "$ZIP_URL"
# Extract the zip file
unzip "$ZIP_FILE"
# Move the library to /usr/local/lib
sudo mv libbasic_math_operations.a /usr/local/lib/
# Move the headers to /usr/local/include
sudo mv basic_math_operations.h /usr/local/include/
sudo mv basic_math_operations.hpp /usr/local/include/
# Cleanup
cd ~
rm -rf "$INSTALL_DIR"
echo "Installation complete!"