mirror of
https://github.com/AikidoSec/safe-chain.git
synced 2026-05-26 12:10:49 +00:00
Some cleanup
This commit is contained in:
parent
97bbc77162
commit
c71320386e
13 changed files with 1601 additions and 240 deletions
|
|
@ -1,21 +0,0 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
# Get the directory where this script is located
|
||||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
INSTALLER_ROOT="${SCRIPT_DIR}/.."
|
||||
|
||||
echo "=== Building Safe Chain Installer for macOS ==="
|
||||
|
||||
# Ensure we are in the installer directory
|
||||
cd "${INSTALLER_ROOT}"
|
||||
|
||||
# Install dependencies
|
||||
echo "Installing build dependencies..."
|
||||
npm install
|
||||
|
||||
# Build the binary and installer using the Node.js build script
|
||||
echo "Building binary and installer..."
|
||||
node build.js --platform=macos
|
||||
|
||||
echo "Done."
|
||||
|
|
@ -3,6 +3,12 @@ set -e
|
|||
|
||||
echo "Installing Safe Chain..."
|
||||
|
||||
# Get the actual user (console user)
|
||||
ACTUAL_USER=$(stat -f '%Su' /dev/console)
|
||||
if [ -z "$ACTUAL_USER" ] || [ "$ACTUAL_USER" = "root" ]; then
|
||||
echo "Warning: Could not detect console user, defaulting to root ownership might cause issues."
|
||||
fi
|
||||
|
||||
# The binary is installed to the location specified by --install-location
|
||||
# which is passed as $3 (installation volume/mountpoint)
|
||||
INSTALL_LOCATION="${3}/tmp/safe-chain-install"
|
||||
|
|
@ -53,8 +59,6 @@ fi
|
|||
echo "Starting Safe Chain proxy service..."
|
||||
|
||||
# Get the actual user to install the LaunchAgent in their home
|
||||
# (We still need this for the LaunchAgent, but not for file permissions)
|
||||
ACTUAL_USER=$(stat -f '%Su' /dev/console)
|
||||
USER_HOME=$(eval echo "~${ACTUAL_USER}")
|
||||
|
||||
# Create LaunchAgent for auto-start on login
|
||||
|
|
|
|||
|
|
@ -1,5 +0,0 @@
|
|||
#!/bin/bash
|
||||
echo "=== Building Safe Chain Installer for Linux ==="
|
||||
echo "TODO: Implement Linux installer build"
|
||||
echo "This is a placeholder script."
|
||||
exit 0
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
@echo off
|
||||
echo === Building Safe Chain Installer for Windows ===
|
||||
echo TODO: Implement Windows installer build
|
||||
echo This is a placeholder script.
|
||||
exit /b 0
|
||||
Loading…
Add table
Add a link
Reference in a new issue