Codebase list google-nexus-tools / 0ab4f6b1-7b5f-4f0b-b9a1-d4561f423834/upstream/5.4+git20220915.1.8859200 compile.sh
0ab4f6b1-7b5f-4f0b-b9a1-d4561f423834/upstream/5.4+git20220915.1.8859200

Tree @0ab4f6b1-7b5f-4f0b-b9a1-d4561f423834/upstream/5.4+git20220915.1.8859200 (Download .tar.gz)

compile.sh @0ab4f6b1-7b5f-4f0b-b9a1-d4561f423834/upstream/5.4+git20220915.1.8859200raw · 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 ../