Skip to content

Instantly share code, notes, and snippets.

@jeremywen
Last active January 30, 2018 15:08
Show Gist options
  • Save jeremywen/263d7d22790cebd08536be86b5968864 to your computer and use it in GitHub Desktop.
Save jeremywen/263d7d22790cebd08536be86b5968864 to your computer and use it in GitHub Desktop.
This script pulls down the VCV Rack community repo, finds source urls, pulls down source repos, and builds plugins.
#!/bin/bash
#################################################################################################################################
# community-builds-from-source.sh
# by Jeremy Wentworth
#
# This script pulls down the VCV Rack community repo, finds source urls, pulls down source repos, and builds plugins.
#
# This script requires:
# git - https://git-scm.com/
# VCV Rack dev env - https://github.com/VCVRack/Rack#setting-up-your-development-environment
#
# Copy this script into:
# Rack/plugins
#
# Run this in Rack/plugins:
# . community-builds-from-source.sh
#
#################################################################################################################################
# check for the community repo locally
if [ -d "community" ]; then
pushd community
# discard any changes
git reset HEAD --hard
# update the community repo if it exists
git pull
popd
else
# community repo does not exist so pull it down
git clone https://github.com/VCVRack/community
fi
# loop through the json in the community repo
for gitPlugin in $(cat community/plugins/*.json | grep \"source\" | awk -F'"' '{print $4}')
do
# get the folder name and see if we already haave it locally
pluginDirName=$(echo $gitPlugin | awk -F'/' '{print $5}')
if [ -d "$pluginDirName" ]; then
echo "$pluginDirName exists"
else
echo "$pluginDirName does not exists yet"
userNameUrlPart=$(echo $gitPlugin | awk -F'/' '{print $4}')
git clone $gitPlugin #NOTE: not all plugins are on github, sonus is on gitlab
fi
# change to the repo dir
pushd $pluginDirName
# Some devs don't have a .gitignore so you can't pull until you do something with the changed files.
git reset HEAD --hard #discards any changes - we could do `git stash` here instead
# pull down the latest code
git pull
# try to update submodules if there are any
git submodule update --init --recursive
# clean old builds (might not be needed but can prevent issues)
make clean
# finally, build the plugin
make
# go back to the last dir
popd
done
@Chaircrusher
Copy link

One thing that gets a little annoying -- some things -- notably AudibleInstruments need to get the v0.5.0 tag revison.
This isn't even maintained consistently, the following is the 'latest' revisions (as of today)
AepelzensModules
AepelzensParasites
AmalgamatedHarmonics v0.5.5
ArableInstruments v0.5.0
AS 0.5.1
AudibleInstruments v0.5.0
Autodafe v0.40
Autodafe-Drums v0.4.0
Befaco v0.5.0
Bidoo v0.5.8
BogaudioModules v0.5.1
cf v0.5.4
community
dBiz v0.5.2
ESeries v0.5.0
Fundamental v0.5.1
hetrickcv 0.5.4
JW-Modules v0.5.8
LOGinstruments v0_5_5
LRTRack v0.0.3
ML_modules 0.5.3
monome-rack
MrLumps v0.5.2
MSM v0.3.2
NauModular v0.5.0
NLNRI_VCVRackPlugins 0.5.1
Nohmad v0.5.1
PvC 0.5.5
qwelk v0.5.4
RJModules 0.5.0
RODENTMODULES 0.5.1
sonusmodular 0.5
Strums_Mental_VCV_Modules v0.5b
trowaSoft-VCV v0.5.5
ValleyRackFree 0.5.3
vcv-gratrix v0.5.0
vcv-karatesnoopy v0.5.0
vcv-link 0.5.1
vcv_luckyxxl v0.5.1
VCV_moDllz
vcvmods 0.5.1
VCVRack-plugin-JE v0.5.1
VCV-Rack-Plugins v0.4.9
vcvrackplugins_av500
vcvrackplugins_dekstop v0.5.0
VCVRack-Simple v0.5.0
VCV-Sequencers

@Chaircrusher
Copy link

This little script checks out the last tag -- the thing is, that will get the tag most recently created, but who knows if it's the best tag to be building.

for x in *
do
if [[ -d $x ]]
then cd $x
echo -n "$x "
rev="$(git tag | tail -1)"
if [[ ! -z "${rev}" ]]
then
git checkout "${rev}"
fi
cd - > /dev/null 2>&1
fi
done

@Chaircrusher
Copy link

My version: https://gist.github.com/Chaircrusher/7174257d3cc9426e158ef8b29947bfb1
By the way, my notes on the current (as of Jan 9 2018) modules
Build failures with the master branch checked out: AudibleInstruments Autodafe Befaco Fundamental VCVRack-Simple RJModules trowaSoft-VCV

The following tags fix most of them. VCVRack-Simple probably builds with GCC version greater than 4.8.5

AudibleInstruments: v0.5.0
Autodafe: broke -- not compatible with Rack 0.5.1 API
Befaco: v0.5.0
Fundamental: v0.5.1
VCVRack-Simple: can't compile with gcc 4.8.5
RJModules: 0.5.0
trowasoft-VCV: v0.5.5

Copy link

ghost commented Jan 11, 2018

LOL ... "MSM v0.3.2" ..this isnt my latest version.. its 0.5.5

@Chaircrusher
Copy link

Sure@Phal-anx -- my understanding of how this all works is evolving.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment