Last active
March 18, 2022 22:15
-
-
Save sabman/92cefa88c362893c67ba31b5bb633c64 to your computer and use it in GitHub Desktop.
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
#!/bin/sh | |
# The least terrible way to resolve a symlink to its real path. | |
function realpath() { | |
/usr/bin/perl -e "use Cwd;print Cwd::abs_path(@ARGV[0])" "$0"; | |
} | |
CONTENTS="$(dirname "$(dirname "$(dirname "$(dirname "$(realpath "$0")")")")")" | |
# BINARY_NAME="$(ls "$CONTENTS/MacOS/")" | |
BINARY_NAME="$(command ls --color=none "$CONTENTS/MacOS/")" | |
ELECTRON="$CONTENTS/MacOS/$BINARY_NAME" | |
CLI="$CONTENTS/Resources/app/cli.js" | |
ELECTRON_RUN_AS_NODE=1 "$ELECTRON" "$CLI" "$@" | |
exit $? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment