You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

validate-archetype-common.sh 1.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. #!/bin/bash
  2. display_usage() {
  3. echo -e "\nUsage:\n$0 <version> <framework staging id> <archetypes staging id> <plugin staging id>\n"
  4. echo -e "Example: 7.3.7 1450 1451 1452"
  5. }
  6. display_sed() {
  7. echo -e "\nGNU sed was not found. If you are running Linux, ensure you have sed installed an in your PATH\n"
  8. echo -e "If you are running Mac OS X, install gsed and ensure it is in your PATH"
  9. }
  10. SED=sed
  11. # Ensure we have GNU sed
  12. $SED --version 2>&1|grep "GNU sed" > /dev/null
  13. if [ "$?" != "0" ]
  14. then
  15. # Try gsed
  16. SED=gsed
  17. gsed --version 2>&1|grep "GNU sed" > /dev/null
  18. if [ "$?" != "0" ]
  19. then
  20. display_sed
  21. exit 2
  22. fi
  23. fi
  24. # if less than two arguments supplied, display usage
  25. if [ $# -le 3 ]
  26. then
  27. display_usage
  28. exit 1
  29. fi
  30. # check whether user had supplied -h or --help . If yes display usage
  31. if [[ ( $# == "--help") || $# == "-h" ]]
  32. then
  33. display_usage
  34. exit 0
  35. fi
  36. ARCHETYPE_GROUP=com.vaadin
  37. ARCHETYPE_VERSION=$1
  38. REPOBASE=https://oss.sonatype.org/content/repositories/
  39. VAADINREPO=$REPOBASE"comvaadin-$2"
  40. ARCHETYPEREPO=$REPOBASE"comvaadin-$3"
  41. PLUGINREPO=$REPOBASE"comvaadin-$4"
  42. ART=test-$ARCHETYPE_ARTIFACT-$ARCHETYPE_VERSION
  43. ART=`echo $ART|sed "s/\./-/g"`
  44. GROUP=testpkg