zyedidia / eget

Easily install prebuilt binaries from GitHub.
MIT License
954 stars 39 forks source link

[Feature,flag suggest]direct unzip(unzip keep layout+keepallfiles) #24

Closed masta99wrfvsHsa closed 2 years ago

masta99wrfvsHsa commented 2 years ago

reason for example.eget keepassxreboot/keepassxc what you will get is the 3 exe without any dll. (keep all files,include exe. flag?)

if any users wants to follow the repo layout / likes to use windows C drive program files. its a must.Imagine you do eget xxx/xxx --to "thesweetfolder"&eget yyy/yyy --to "thesweetfolder" The next time you open the "thesweetfolder" OMG,its keepassxc+eget+fzf+yyy+(manually installed obs)+(10 manually installed apps) they probably need to pray for the dll being compatible. (keep zip inner layout flag?)

I think most zip extraction api should have a -keep layout option built-in.

zyedidia commented 2 years ago

I'm not sure I understand the desired behavior. If you want to extract every file in the archive, you can use

eget --all --file '*' [repo]
masta99wrfvsHsa commented 2 years ago

here is an example(with:eget --all [repo] ) Extracted activitywatch/aw-server/pytz/zoneinfo/US/Pacific to X:\apps\Pacific The ideal output path is at>activitywatch/aw-server/pytz/zoneinfo/US/Pacific (keeping and creating all the folder* just as its packaged in the zip)

in this case:"activitywatch/aw-server/pytz/zoneinfo/US/" all recursive folders are gone,the server mix with other stuff.other timezone mix,app folder is gone,

some packaged application releases are very sensitive to the layer,direct extraction into a flat path is not the way.

Thus i propose to add a new flag

masta99wrfvsHsa commented 2 years ago

after testing,i find:eget --all --file [repo] worked,the quote seems to throw:target `''` not found in archive

masta99wrfvsHsa commented 2 years ago

will do pr to add example to readme.

lwbt commented 1 year ago

Although --all --file * is in the examples it is not clear why one would need to specify --file * when --all is... well supposed to extract all files. From experience with projects and co-workers, people will use --all, and wonder some time later why the tool didn't do what it was supposed to do. And then they blame the tools and want to replace it with another instead of realizing an acknowledging a mistake.

I just caught this unexpected behavior now while I'm trying out this nice tool (chezmoi does something similar while being a dotfile manager) and being very careful. But not everyone is.

So please update the documentation or at leas put a comment above said example that explains better the how and why of --all --file *.