mirror of
https://github.com/BillyOutlast/posthog.git
synced 2026-02-04 03:01:23 +01:00
26 lines
611 B
Bash
Executable File
26 lines
611 B
Bash
Executable File
#!/bin/sh
|
|
|
|
DIR_NAME=$(dirname "$0")
|
|
|
|
# Create a temporary directory in /tmp
|
|
TEMP_DIR=$(mktemp -d -p /tmp "aggregate_funnel_XXXXXXXXXX")
|
|
|
|
# Trap to clean up the temporary directory on exit
|
|
trap 'rm -rf "$TEMP_DIR"; exit' 0
|
|
|
|
# Determine which executable to use based on architecture
|
|
case $( uname -m ) in
|
|
aarch64)
|
|
EXECUTABLE_NAME="aggregate_funnel_aarch64"
|
|
;;
|
|
*)
|
|
EXECUTABLE_NAME="aggregate_funnel_x86_64"
|
|
;;
|
|
esac
|
|
|
|
# Copy the executable to a temporary location
|
|
cp "$DIR_NAME/$EXECUTABLE_NAME" "$TEMP_DIR/$EXECUTABLE_NAME"
|
|
chmod +x "$TEMP_DIR/$EXECUTABLE_NAME"
|
|
"$TEMP_DIR/$EXECUTABLE_NAME" "$@"
|
|
|