Skip to content

Instantly share code, notes, and snippets.

@Eneroth3
Last active November 27, 2020 14:37
Show Gist options
  • Save Eneroth3/fce7ec65c52d8b2e28b5f3420a459bde to your computer and use it in GitHub Desktop.
Save Eneroth3/fce7ec65c52d8b2e28b5f3420a459bde to your computer and use it in GitHub Desktop.
# Load SketchUp plugins from Git working directories.
#
# Place this script in SketchUp's extension folder and adapt pattern
# to where you keep SketchUp extensions Git repos.
#
# Make sure all Git repos have a folder `src` or `source` containing
# the actual SketchUp extension code, as opposed to tests and other
# project related files.
pattern = "/Users/cenerot/Source/SketchUp Extensions/*/{src,source}/"
Dir.glob(pattern).each do |dir|
$LOAD_PATH << dir
Dir.glob("#{dir}/*.rb").each { |p| require p }
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment