5ec89a199a
TBR=jacobr@google.com BUG= TEST= Review URL: https://chromiumcodereview.appspot.com//10010009 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6231 260f80e4-7a28-3924-810f-c04153c831b5
136 lines
4.2 KiB
Bash
Executable File
136 lines
4.2 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# get the number of command-line arguments given
|
|
ARGC=$#
|
|
|
|
if [[ $ARGC -eq 1 ]];
|
|
then
|
|
if [[ $1 = "simple" ]];
|
|
then
|
|
./../../template/template name_entry_simple.tmpl name_entry.dart
|
|
cd ../../../frog
|
|
./frog.py --html -- ../utils/tests/template/test_simple.dart
|
|
elif [[ $1 = "simple1" ]];
|
|
then
|
|
./../../template/template name_entry.tmpl name_entry.dart
|
|
cd ../../../frog
|
|
./frog.py --html -- ../utils/tests/template/test_simple.dart
|
|
elif [[ $1 == "simple2" ]];
|
|
then
|
|
./../../template/template name_entry2.tmpl name_entry.dart
|
|
cd ../../../frog
|
|
./frog.py --html -- ../utils/tests/template/test_simple.dart
|
|
elif [[ $1 == "simple3" ]];
|
|
then
|
|
./../../template/template name_entry_css.tmpl name_entry.dart
|
|
cd ../../../frog
|
|
./frog.py --html -- ../utils/tests/template/test_simple.dart
|
|
elif [[ $1 == "simple4" ]];
|
|
then
|
|
./../../template/template name_entry_text.tmpl name_entry.dart
|
|
cd ../../../frog
|
|
./frog.py --html -- ../utils/tests/template/test_simple.dart
|
|
elif [[ $1 == "simplecall" ]];
|
|
then
|
|
./../../template/template callview.tmpl name_entry.dart
|
|
cd ../../../frog
|
|
./frog.py --html -- ../utils/tests/template/test_simple.dart
|
|
elif [[ $1 == "with1" ]];
|
|
then
|
|
./../../template/template productview.tmpl productview.dart
|
|
cd ../../../frog
|
|
./frog.py --html -- ../utils/tests/template/test_with.dart
|
|
elif [[ $1 == "with2" ]];
|
|
then
|
|
./../../template/template productview2.tmpl productview.dart
|
|
cd ../../../frog
|
|
./frog.py --html -- ../utils/tests/template/test_with.dart
|
|
elif [[ $1 == "with3" ]];
|
|
then
|
|
./../../template/template productview_localname.tmpl productview.dart
|
|
cd ../../../frog
|
|
./frog.py --html -- ../utils/tests/template/test_with.dart
|
|
elif [[ $1 == "with4" ]];
|
|
then
|
|
./../../template/template productview3.tmpl productview.dart
|
|
cd ../../../frog
|
|
./frog.py --html -- ../utils/tests/template/test_with.dart
|
|
elif [[ $1 == "nested" ]];
|
|
then
|
|
./../../template/template nestedview.tmpl nestedview.dart
|
|
cd ../../../frog
|
|
./frog.py --html -- ../utils/tests/template/test_nested.dart
|
|
elif [[ $1 == "list1" ]];
|
|
then
|
|
./../../template/template applications.tmpl applications.dart
|
|
cd ../../../frog
|
|
./frog.py --html -- ../utils/tests/template/test_list.dart
|
|
elif [[ $1 == "list2" ]];
|
|
then
|
|
./../../template/template applications2.tmpl applications.dart
|
|
cd ../../../frog
|
|
./frog.py --html -- ../utils/tests/template/test_list.dart
|
|
elif [[ $1 == "complex" ]];
|
|
then
|
|
./../../template/template top_searches.tmpl top_searches.dart
|
|
cd ../../../frog
|
|
./frog.py --html -- ../utils/tests/template/test_complex.dart
|
|
elif [[ $1 == "complexcss" ]];
|
|
then
|
|
./../../template/template top_searches_css.tmpl top_searches.dart
|
|
cd ../../../frog
|
|
./frog.py --html -- ../utils/tests/template/test_complex.dart
|
|
elif [[ $1 == "complex2" ]];
|
|
then
|
|
./../../template/template top_searches2.tmpl top_searches2.dart
|
|
cd ../../../frog
|
|
./frog.py --html -- ../utils/tests/template/test_complex2.dart
|
|
elif [[ $1 == "real" ]];
|
|
then
|
|
./../../template/template realviews.tmpl realviews.dart
|
|
cd ../../../frog
|
|
./frog.py --html -- ../utils/tests/template/real_app.dart
|
|
elif [[ $1 == "clean" ]];
|
|
then
|
|
# remove all generated templates
|
|
echo "rm name_entry.dart"
|
|
rm -f name_entry.dart
|
|
echo "rm productview.dart"
|
|
rm -f productview.dart
|
|
echo "rm nestedview.dart"
|
|
rm -f nestedview.dart
|
|
echo "rm applications.dart"
|
|
rm -f applications.dart
|
|
echo "rm top_searches.dart"
|
|
rm -f top_searches.dart
|
|
echo "rm top_searches2.dart"
|
|
rm -f top_searches2.dart
|
|
echo "rm realviews.dart"
|
|
rm -f realviews.dart
|
|
fi
|
|
else
|
|
echo -e "\033[31mUnknown test\033[0m"
|
|
echo -e ""
|
|
echo -e "Known tests are:"
|
|
echo -e " simple"
|
|
echo -e " simple1"
|
|
echo -e " simple2"
|
|
echo -e " simple3"
|
|
echo -e " simple4"
|
|
echo -e " simplecall"
|
|
echo -e " with1"
|
|
echo -e " with2"
|
|
echo -e " with3"
|
|
echo -e " with4"
|
|
echo -e " nested"
|
|
echo -e " list1"
|
|
echo -e " list2"
|
|
echo -e " complex"
|
|
echo -e " complexcss"
|
|
echo -e " complex2"
|
|
echo -e " real"
|
|
echo -e ""
|
|
echo -e "clean - removes all template generated Dart classes"
|
|
fi
|
|
|