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

Allow user to pipe stdin into the cli tool #14

Open
djfarrelly opened this issue Jan 20, 2019 · 0 comments
Open

Allow user to pipe stdin into the cli tool #14

djfarrelly opened this issue Jan 20, 2019 · 0 comments
Labels

Comments

@djfarrelly
Copy link
Contributor

Purpose

Currently a user w/ lots of different globs to pass to -files might have to do some extra bash work to make a nice clean list into a string before using this cli. If someone could pipe in a list, it could make it simpler to do this in a pre-build bash script.

Idea

FILE_GLOBS=(
  'public/css/*.css'
  'public/js/*.js'
  'public/img/*.*'
  'public/img/**/*.*'
  'public/img/**/**/*.*'
  'public/video/*.*'
  'public/video/**/*.*'
  'public/misc/*.*',
  'public/fonts/*.*'
)
FILES=$(printf ",%s" "${FILE_GLOBS[@]}")
FILES=${FILES:1} # slice the first "," char

./buffer-static-upload -files "$FILES" -dir marketing

Could be turned into:

echo "
public/css/*.css
public/js/*.js
public/img/*.*
public/img/**/*.*
public/img/**/**/*.*
public/video/*.*
public/video/**/*.*
public/misc/*.*,
public/fonts/*.*
" | ./buffer-static-upload -dir marketing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant