Skip to content

Instantly share code, notes, and snippets.

@yinyin
Created July 5, 2017 16:04
Show Gist options
  • Save yinyin/49a14ac2ea2f80a2041b94259c178401 to your computer and use it in GitHub Desktop.
Save yinyin/49a14ac2ea2f80a2041b94259c178401 to your computer and use it in GitHub Desktop.
Set environment variable for Dart
#!/bin/bash
# source ~/bin/env-dart.sh
OPT_BASE=~/bin/app
which dart
if [ "$?" != "0" ]; then
export PATH=$PATH:${OPT_BASE}/dart/dart-sdk/bin
echo "PATH=${PATH}"
cat ${OPT_BASE}/dart/dart-sdk/version
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment