Last active
August 11, 2017 14:49
-
-
Save weavenet/af002bde11adc8fb7b31 to your computer and use it in GitHub Desktop.
Wrapper script to execute trello CLI with arguments read from a dot file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Wrapper script for trello cli that appends default arguments as well as reads | |
# additional arguments from a file if it exists in the cwd. It is assumed | |
# the file contains a text string of arguments to append to the command. | |
# | |
# See https://github.com/brettweavnet/trello_cli/issues/22 for more details | |
# | |
# For example, the file .trellocli existing in a directory with the content: | |
# | |
# -b 12345 | |
# | |
# When ran with the following args: | |
# | |
# trello.sh board list | |
# | |
# It will execute: | |
# | |
# trello board list -o json -b 12345 | |
cmdArgs=$@ | |
commonArgs="-o json" | |
if [ -e ".trellocli" ]; then | |
fileArgs=`cat .trellocli` | |
fi | |
trello $cmdArgs $commonArgs $fileArgs |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment