AppImageCrafters / AppRun

AppDir runtime components
MIT License
26 stars 10 forks source link

Using bash script with AppRun seg faults #22

Closed mmtrt closed 3 years ago

mmtrt commented 3 years ago

But running that appimage under archlinux errors that it can't find bash, dirname, cat, some other commands used in bash script,

so adding path /bin /usr/bin in starting of script fixes appimage exec but then same appimg seg faults on ubuntu.

azubieta commented 3 years ago

To run any kind of script from your AppImage you have to bundle the script interpreter. In case of bash you need to bundle batch itself. Use the script interpreter as entry point and pass the script as the first argument the the rest of your arguments.

It would be something like this:

AppDir:
  app_info:
     exec: bin/bash
     exec_args: $APPDIR/my_cool_script.sh $@
mmtrt commented 3 years ago

Bundling coreutils , bash and using exec path and arg change seems to fix it thanks.