Codebase list google-nexus-tools / run/41dd6829-71b8-4602-a82d-fbda012ba83c/main compile.sh
run/41dd6829-71b8-4602-a82d-fbda012ba83c/main

Tree @run/41dd6829-71b8-4602-a82d-fbda012ba83c/main (Download .tar.gz)

compile.sh @run/41dd6829-71b8-4602-a82d-fbda012ba83c/mainraw · history · blame

# This script is for compiling the Dart executable
# The current path needs to be set to the root of the repository first
# You also need the Dart SDK and zip installed

OS=$(uname)
ARCH=$(uname -m)
FILENAME=""

if [ "$OS" = "Darwin" ]; then
    # This will need to be updated when M1 support is added
    FILENAME="nexustools-macos-x64"
elif [ "$OS" = "Linux" ] && [ "$ARCH" = "x86_64" ]; then
    FILENAME="nexustools-linux-x64"
elif [ "$OS" = "Linux" ] && [ "$ARCH" = "amd64" ]; then
    FILENAME="nexustools-linux-x64"
else
    FILENAME="nexustools"
fi

mkdir -p ./dist
dart compile exe "./bin/main.dart" -o "./dist/nexustools"
cd ./dist
zip "$FILENAME.zip" "nexustools"
rm "nexustools"
cd ../