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

CLI options for change working directory ? #50

Open
abcfy2 opened this issue Aug 7, 2021 · 2 comments
Open

CLI options for change working directory ? #50

abcfy2 opened this issue Aug 7, 2021 · 2 comments

Comments

@abcfy2
Copy link

abcfy2 commented Aug 7, 2021

Just like tar -C, this is used for one line command without cd:

$ bestzip -C dist ../dist.zip .

Also cpy-cli provide this option:

    Copy all .html files inside src folder into dist and preserve path structure
    $ cpy '**/*.html' '../dist/' --cwd=src --parents
@nfriedly
Copy link
Owner

Hum, I'm not sure. I try to keep the command-line arguments on bestzip to a subset of those on the native zip command, and mine doesn't appear to have one for changing the CWD. Also, that can be handled by just doing a cd into the appropriate directory first.

@melgish
Copy link

melgish commented Apr 5, 2022

Controlling the CWD from the outside means any actions after bestzip have to account for the folder change.

build && cd dist && bestzip ../output.zip ./* && cd .. && deploy output.zip

vs

build && bestzip -C dist ../output.zip ./* && deploy output.zip

To me, the first, while it works, is less elegant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants