Quick question re running .sh locally on mac

Hey all, I’m working on a joint project with @choicehacker, but their timezone is several hours behind mine so it’s going to be a few hours before I can get something from them and I’d like to work on the project until then…so:

He’s coding everything, but I’m trying to amend my writing and I can’t get my head around what the first step of this advice means:

  • Remember that you can always run the code locally! Go to the scenes directory and run


It will also run all tests and find some basic mistakes.
You can then run the usual ./serve.command.

  • The resulting startup.txt is the file you can push on dashingdon. Feel free to update Dashindon with new code, but let’s make sure Github and Dashingdon are consistent. So, I would suggest this process:

    • Update the code, compile (all_parse.sh) and run locally.
    • Push to Github
    • Push to Dashingdon

So I think I go into Terminal, on my mac,
write ‘sh’
then drag the ./all_parse.sh file in
then - does something happen?

weirdly the startup file isn’t a .txt file, it is a .src file
and I can’t just change the suffix, (I tried and, uncompiled, running from index.html, the browser seems unhappy with his other coding commands)
I need to compile this darn thing to make sense of all his whizz coding (soo over my head)

Don’t worry if you can’t enlighten me. I’m sure he can explain in a few hours.

Even if you can’t make sense of this for me - a link to a topic on the forum or a webpage where I can learn how to run choicescript locally (without Dashingdon) would be very useful. I can’t seem to find the right search terms to pull up something useful on the forum.

1 Like

It seems that your colleague developed a custom solution. Choicescript doesn’t have any .sh file.

.sh stands for “shell” (terminal). It’s a Linux shell file, like batch files (.bat) in Windows. Since macs run on top of a Linux kernel, I expect it to be at least similar, so your instructions should be ok.

  1. type sh, the terminal will display only a $ sign
  2. drag the file there, the terminal will display the full path
  3. press enter to run

.scr is a semantical extension. It doesn’t change the structure of the file, so it should be safe to rename it. It only tells a compiler that the file is a source code. You can open it with any text editor, like notepad, because it’s just a plain text file.

As far as I know, choicescript compiler ignores any file that doesn’t have a .txt extension. But since you’re working with a custom solution it’s hard for me to say what’s the problem. But if I understand your colleague’s instruction, you should run both all_parse.sh and serve.command. But I don’t know for sure :sweat_smile:. I don’t know what these scripts are doing.


Thank you - that really helps my understanding of what I’m doing :slight_smile:

1 Like

This topic was automatically closed 24 hours after the last reply. If you want to reopen your WiP, contact the @moderators.