Codebase list google-nexus-tools / 4bebb7b2-cb0e-4a1c-93dc-a4bba6e563b8/upstream/5.4 compile.sh
4bebb7b2-cb0e-4a1c-93dc-a4bba6e563b8/upstream/5.4

Tree @4bebb7b2-cb0e-4a1c-93dc-a4bba6e563b8/upstream/5.4 (Download .tar.gz)

compile.sh @4bebb7b2-cb0e-4a1c-93dc-a4bba6e563b8/upstream/5.4raw · 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 ../