Skip to content

Allow user to pipe stdin into the cli toolΒ #14

Open
@djfarrelly

Description

@djfarrelly

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions