79653809

Date: 2025-06-05 04:57:53
Score: 2.5
Natty:
Report link

Based on this article:
https://medium.com/@lllttt06/codex-setup-scripts-for-flutter-86afd9e71349

#!/bin/bash
set -ex

FLUTTER_SDK_INSTALL_DIR="$HOME/flutter"
git clone https://github.com/flutter/flutter.git -b stable "$FLUTTER_SDK_INSTALL_DIR"
ORIGINAL_PWD=$(pwd)
cd "$FLUTTER_SDK_INSTALL_DIR"
git fetch --tags
git checkout 3.29.3
cd "$ORIGINAL_PWD"

BASHRC_FILE="/root/.bashrc"
FLUTTER_PATH_EXPORT_LINE="export PATH=\"$FLUTTER_SDK_INSTALL_DIR/bin:\$PATH\""
echo "$FLUTTER_PATH_EXPORT_LINE" >> "$BASHRC_FILE"
export PATH="$FLUTTER_SDK_INSTALL_DIR/bin:$PATH"

flutter precache

# Use your own project name
PROJECT_DIR="/workspace/[my_app]"

cd "$PROJECT_DIR"
flutter pub get
flutter gen-l10n
flutter packages pub run build_runner build --delete-conflicting-outputs
Reasons:
  • Blacklisted phrase (1): this article
  • Blacklisted phrase (0.5): medium.com
  • Probably link only (1):
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: shynah