Skip to content

Instantly share code, notes, and snippets.

@TatsuUkraine
Last active Aug 5, 2020
Embed
What would you like to do?
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