Skip to content

Conversation

@nicktimko
Copy link

Adds a script for Git-users that finds the library path (if openscad is on $PATH as a command), or guesses what it should be based on the OS, then git clones or pulls into the appropriate directory.

Skips the zip download, extract, renaming, finding the library path, moving.

The link in the README obviously doesn't work pre-merge, but you could look at it in the PR branch here: https://raw.githubusercontent.com/nicktimko/BOSL2/refs/heads/installer-script/get_bosl2.sh

Example run:

$ ls Documents/OpenSCAD/libraries
$ curl -sSL https://raw.githubusercontent.com/nicktimko/BOSL2/refs/heads/installer-script/get_bosl2.sh | bash
OpenSCAD library path determined from 'openscad --info': /Users/nick/Documents/OpenSCAD/libraries
New installation into /Users/nick/Documents/OpenSCAD/libraries/BOSL2
Cloning into '/Users/nick/Documents/OpenSCAD/libraries/BOSL2'...
remote: Enumerating objects: 18229, done.
remote: Counting objects: 100% (585/585), done.
remote: Compressing objects: 100% (111/111), done.
remote: Total 18229 (delta 513), reused 482 (delta 474), pack-reused 17644 (from 3)
Receiving objects: 100% (18229/18229), 25.37 MiB | 25.17 MiB/s, done.
Resolving deltas: 100% (12196/12196), done.
$ ls Documents/OpenSCAD/libraries
BOSL2
$ curl -sSL https://raw.githubusercontent.com/nicktimko/BOSL2/refs/heads/installer-script/get_bosl2.sh | bash
OpenSCAD library path determined from 'openscad --info': /Users/nick/Documents/OpenSCAD/libraries
Updating BOSL2 library in /Users/nick/Documents/OpenSCAD/libraries/BOSL2
Already up to date.

@adrianVmariano
Copy link
Collaborator

If you are a git user couldn't you dispense with this script and just do a "git pull" from the directory where BOSL2 is installed?

@nicktimko
Copy link
Author

This script also tries to find the OpenSCAD plugin directory and does the initial git clone.

The script could be modified to download/unzip the repo tarball, but I think there's a small space between "knows how to copy-paste a one-line script into the shell" and "has git".

@revarbat
Copy link
Collaborator

This needs a .MSI file to fetch and install the repo on Windows systems. Also, the README needs to explain installation on Windows using the .MSI installer file, and it needs to explain curl and git installation on both Linux (apt-get, dnf, etc) and MacOS (brew install)

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants