Skip to content

Conversation

@poliphant
Copy link

… a launching script name to a startup_script

Update the ARCHIVE_DIR variable to provide an absolute path even when the makeself script is launched with a relative path. An absolute path is needed when the startup script is ask to place folder and files in a directory relative to the makeself script location.

Add the ARCHIVE_BASE variable. This provides the name of the originating makeself script. This is useful to provide feedback to the user in for example 'usage' messages.

… a launching script name to a startup_script

Update the ARCHIVE_DIR variable to provide an absolute path even when the makeself script is launched with a relative path. An absolute path is needed when the startup script is ask to place folder and files in a directory relative to the makeself script location.

Add the ARCHIVE_BASE variable. This provides the name of the originating makeself script. This is useful to provide feedback to the user in for example 'usage' messages.
@megastep
Copy link
Owner

Interesting idea, however it seems to break a number of our tests at the moment.

@poliphant
Copy link
Author

poliphant commented Apr 13, 2024 via email

@megastep
Copy link
Owner

Try to run the tests yourself (make test), and see which tests fail. These seem to fail even on very common platforms like Ubuntu. Then see what you can change to make this work in a way that covers all platforms. I would suggest using some VMs if you don't have access to some platforms.

@megastep
Copy link
Owner

FYI, the variable test seems to be the main culprit.

USER_PWD="\$PWD"
export USER_PWD
ARCHIVE_DIR=\`dirname "\$0"\`
ARCHIVE_DIR=\$( cd -- "\$(dirname "\$0")" >/dev/null 2>&1 ; echo \$PWD )
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One problem here is that the $() syntax is a modern bash-ism which is not very portable (unlike the backtick approach).

poliphant and others added 2 commits April 15, 2024 16:20
replaced with back ticks for better backward compatibility
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants