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.

40 lines
869B

  1. # check for the community repo locally
  2. # RUN IN plugins directory inside Rack.
  3. # USAGE grabPlugins.sh <target>
  4. # Where <target> is one of win, lin, or mac
  5. if [ $# -gt 0 ]
  6. then
  7. platform="${1}"
  8. else
  9. platform=mac
  10. fi
  11. if [ -d "community" ]; then
  12. pushd community
  13. # discard any changes
  14. git reset HEAD --hard
  15. # update the community repo if it exists
  16. git pull
  17. popd
  18. else
  19. # community repo does not exist so pull it down
  20. git clone https://github.com/VCVRack/community
  21. fi
  22. for gitPlugin in $(cat community/plugins/*.json | grep 'mac.zip' | awk -F'"' '{ print $4}')
  23. do
  24. zipname="$(echo $gitPlugin | sed -e 's@.*/@@' | sed -e 's/\?raw=true//')"
  25. curl -L "${gitPlugin}" -o "${zipname}"
  26. if [[ -f ${zipname} ]]
  27. then
  28. unzip -o "${zipname}"
  29. rm "${zipname}"
  30. fi
  31. done
  32. if [ "${platform}" != "mac" ]
  33. then
  34. rm -fr __MACOSX
  35. fi