(Note: I’m assuming you’re on a Mac, but most of this will be useful regardless of platform.)
Here’s an article that walks you through the basics of how to get around the file system in the Terminal:
Here’s a couple examples to illustrate what’s going on when you type commands.
When you type a command, the system needs to know where the file that you are trying to execute is. For example, you might type:
druid
You probably noticed that will work wherever you are when you type the command. That’s because when druid was installed, it was put in a special place the system looks at when you type a command. That is, not finding druid in the current directory (i.e. the directory you are in when you type the command), the system goes looking in the usual places. So the system still needs the complete path, but it has a clue about how to figure it out itself without you typing it explicitly (or being in the directory with the druid executable file).
However, in the case of the flash.sh, it wasn’t installed in the same way druid was, it’s just a random file sitting on your computer. So in this case you need to provide the path to the file. The easiest way is to navigate to that folder and execute the command there. So, once there, you’d think you could just type this:
flash.sh
But, no luck. You actually need to type:
./flash.sh
The “./“ is a shortcut that means “the current directory.”
It may not be obvious (i.e. it is totally not obvious) how to figure out the path of a file on your system. Luckily, there’s a handy shortcut to help you navigate the file system. Type:
cd
(Important note: there needs to be a space after the “cd”)
Then, drag the folder from the Finder and drop it anywhere onto the Terminal window. The path will then magically appear after the cd. Hit ‘return’ and you’ll be transported to the directory.
That’s a personal preference, but putting all your scripts in one place is probably a sensible choice. In that case you can make a Crow folder (wherever you want), drop the examples folder into that folder and make a “MyCoolScripts” folder there as well. Then navigate to that folder (as described above) and launch druid from there. That way, once in the druid app, you can upload scripts from either collection easily:
u examples/boids.lua
or
u MyCoolScripts/worldchangingalgorithm.lua
Note that, unlike when executing commands in the Terminal, you don’t need the leading ./ when you provide the path to the script.