Feature: CLI options for bundle directory and program name #284
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Implements #282.
--bundle-dir
will determine where the bootloader extracts the archive to.--prog-name
will determine the name of the program within the archive. For example:Checklist
Testing
Testing done in
test/bundle-dir-prog-name.sh
.$STATICX_BUNDLE_DIR
is the same as--bundle-dir
.basename $0
is the same as--prog-name
.CLI
--bundle-dir
with help message.--prog-name
with help message.Documentation
--bundle-dir
and--prog-name
under thedocs/usage.rst
.--bundle-dir
and--prog-name
.get_symlink
,move_bundle
, andfile_exists
.add_bundle_dir_symlink
.Implementation
--prog-name
--prog-name
when specified instead of thebasename
of positional argumentprog
.--bundle-dir
Unfortunately, I don't have the C skills to have it extract directly to the new bundle directory, so my solution here is to extract to the
/tmp/staticx-XXXXXX
and then move it to the new bundle directory, which is obviously not ideal. If anyone has any ideas about how to read the TAR archive to get the symlink before extracting please feel free to jump in.--bundle-dir
.Ignore #283. I just had some branch name issues there that caused it to auto close.