application-modernization-javaee-quarkus icon indicating copy to clipboard operation
application-modernization-javaee-quarkus copied to clipboard

Shell files aren't usable on Ubuntu/Debian

Open TimonLukas opened this issue 3 years ago • 2 comments

Hey! I'm currently trying to deploy parts of this repository for a demo, thank you for the great resource!

Sadly, it's not possible to use the scripts as-is on Ubuntu or Debian machines. Their sh implementation, Dash, is written to be very small, and as such doesn't support many features you'd expect. They already error on the declaration of the out function. If I execute them using bash (as in the shebang line) everything works perfectly.

My solution is now to replace every occurrence of sh [some script] with ./[some script]. On another machine I solved this problem by symlinking /bin/bash to /usr/bin/s, but that's a very dirty solution.

Based on the shebang lines, would anything break on other environments if this change would be implemented?

TimonLukas avatar Apr 12 '21 12:04 TimonLukas

Hi Timon, I've only tested on Mac so far. I want to create a Docker image with all tools installed so that the scripts can be run on various operating systems.

nheidloff avatar Apr 12 '21 12:04 nheidloff

That sounds like a great idea!

For now I'll still try to get it running myself on a Debian installation. I'll update this comment with any steps that were necessary to do so - if it's just a few and it keeps working on Mac (which it should), it could be a nice thing to do until that Docker setup is finished :)

  • Permissions error for /scripts/* and /scripts-docker/* - fixed using chown -R +x scripts*
  • Error because of Dash - fixed using sed -i 's/sh /.\//' scripts*/**

Update: Those commands sufficed, now the script ran through perfectly on Debian :)

TimonLukas avatar Apr 12 '21 13:04 TimonLukas