Skip to content

Instantly share code, notes, and snippets.

@TatsuUkraine
Last active August 5, 2020 22:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TatsuUkraine/99d2af08f6dfef17982299afa56f6507 to your computer and use it in GitHub Desktop.
Save TatsuUkraine/99d2af08f6dfef17982299afa56f6507 to your computer and use it in GitHub Desktop.
flutter 1.19 parse sh script
# Type a script or drag a script file from your workspace to insert its path.
function urldecode() { : "${*//+/ }"; echo "${_//%/\\x}"; }
IFS=',' read -r -a define_items <<< "$DART_DEFINES"
for index in "${!define_items[@]}"
do
define_items[$index]=$(urldecode "${define_items[$index]}");
done
printf "%s\n" "${define_items[@]}"|grep '^DEFINEEXAMPLE_' > ${SRCROOT}/Flutter/Defineexample.xcconfig
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment