Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update makeself-header.sh to better handle relative paths and provide… #328

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

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.

@@ -15,8 +15,11 @@ SIGNATURE="$Signature"
TMPROOT=\${TMPDIR:=/tmp}
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.

None yet

2 participants