#(slickthemi) Start Shell Script Mac Sonoma 14.5

1 messages · Page 1 of 1 (latest)

main mirage
#

Hi, I'm brand new and working through the beginner's guide and of course I'm stuck on the very first step. I'm trying to create a start shellscript, and using the instructions found here - https://www.spigotmc.org/wiki/spigot-installation/#mac-os-x. When I try to save the script, I get an error - Expected end of line, etc. but found """ Could someone help me with what I"m doing wrong?

rough geyserBOT
#

(slickthemi) Start Shell Script Mac Sonoma 14.5

rough geyserBOT
#

Hi I'm AutoThreadBot! Don't mind me, I'll just be adding the helper team to this thread so they can see it. A human will get to you soon.

lofty edge
#

Sure, can you provide your startup script?

#

Actually the script on this site is slightly weird, no idea why it's cding inside the directory

late shore
#

Wondering that myself too.

#

Perhaps the CLI for OSx runs in root dir natively?

lofty edge
#

no

#

I suppose they're just making it different and leave the startup script outside of the directory

#

Anyway you can just do

#!/bin/bash
java -Xms1G -Xmx1G -jar paperclip.jar nogui

and it will be just fine

main mirage
#

I tried that and now it says Expected end of line, etc. but found identifier

lofty edge
#

Did you switch paperclip.jar with the name of your jar?

main mirage
#

oh no I kept it paper. I thought you had named yours paperclip. Do I need to rename the jar file to paperclip, or just type paperclip in the script?

lofty edge
#

No you have to rename it to your .jar file

main mirage
#

same error

lofty edge
#

Can you provide a screenshot

#

of terminal output

main mirage
#

I wrote it in script editor. Could that be the problem?

lofty edge
#

Possible yeah. I recommend using TextEdit or Visual Studio Code for it.

main mirage
#

I also tried typing it into terminal through nano and nothing happened when I hit enter

#

I'm brand new at this, trying to learn. I don't know how to use textedit or visual studio code. I'm unfamiliar with how terminal works or how to do shell scripts, just piecemealing from Google searches.

lofty edge
#

Oh so you're also not familiar with macOS?

lofty edge
main mirage
#

from a coding perspective, I am not. I am familiar with working on a mac. I guess I didn't recognize I'd need to learn that in order to start learning Denizen for MC 😄

lofty edge
#

TextEdit is the default text editor on mac, that's why I asked lol

#

search for it in your Spotlight Search

main mirage
main mirage
lofty edge
#

Yep

main mirage
#

Is the file format a rich text document?

#

those are my options

lofty edge
#

Technically you can use .rtf and rename it afterwards in finder. But ehh.. at this point why not just using VS Code.

#

You will need it anyways for Denizen scripting

main mirage
#

sure, I'm happy to try that. Are there instructions in the beginners guide to find and download (i.e. version requirements, best sites, etc.), or is it straightforward search for it and download it?

lofty edge
#

Do you use brew?

main mirage
#

in the guide?

lofty edge
main mirage
#

ok cool, downloading it now.

#

Also, tried renaming the file and it reverted back, so that didn't work :/

main mirage
#

Can anyone tell me what I'm doing wrong here?

lofty edge
#

You need to run chmod +x <pathtoSHfile>

#

There is a missing space in your command that you executed

main mirage
#

I tried putting a space after the x and it just returns to the next line. Is that where the missing space is?

#

I'm honestly wondering if I'm having this much trouble jsut setting up my test server if I'm built to learn Denizen

lofty edge
#

That should be fine now

main mirage
#

wait, I wonder if I donwloaded the wrong java file. Should it be jdk or jre?

lofty edge
#

You have not even started the server

#

What's /Users/j-mo/Server/start.sh returning now

#

Is it still yelling no permission?

main mirage
#

oh ok so I hit enter then it returns then do it again without the +x?

lofty edge
#

What is the command you put into your console?

main mirage
#

originally chmod a+x <directory>

lofty edge
#

You only need to run chmod once, to make it runnable

main mirage
#

then I just tried the command without the a+x, and it is saying Error: unable to access jarfile paperclip.jar

lofty edge
#

Can you cd to the folder

main mirage
#

ah it's working!

lofty edge
main mirage
#

thx for your help, whew! Was about to quit before even getting started!

lofty edge
#

Now the real part can begin lol

main mirage
#

lol yeah finally

late shore
#

Ah

lofty edge
#

The executable does not retain the path if you run it from a different location

pallid grailBOT
#
Thread Closing Reminder

Has your issue been resolved, or your question been answered?
If so, please use the </resolved:1028673926114594866> command to close your thread.
Or </invalid:1028673926898909185> if it's not possible to resolve.

If not yet resolved, please reply below to tell us what you still need.

(Note that if there is no reply for a few days, this thread will eventually close itself.)

#

@main mirage