shell script question on homestead I added a nginx config rewrite rule to remove static asset numbers from file names. It works great on the server config file.


    # enable static file caching
    location ~* (.+)\.(?:\d+)\.(js|css|png|jpg|jpeg|gif|webp)$ {
     try_files $uri $1.$2;
    }


However I'm now trying to use a custome serve-craft.sh on my homestead local to replace the default serve.laravel.sh. (to prevent losing my nginx config every time I do a reload --provision).

I'm not familiar with sh syntax and the following doesn't seem to work when I load the sh by adding a "type:craft" to my homestead.yaml
I suspect the try_files line has syntax error

How could I rewrite this in shell script?

Any idea anyone?
The best way to accomplish what you're trying to accomplish would be to utilize the after.sh shell script that Homestead provides. Check out Extending Homestead and Local Development with Vagrant / Homestead