Skip to content

Instantly share code, notes, and snippets.

@seize-the-dave
Last active May 10, 2018 10:37
Show Gist options
  • Save seize-the-dave/5ea472d8787ec90522e1f186fdf830c3 to your computer and use it in GitHub Desktop.
Save seize-the-dave/5ea472d8787ec90522e1f186fdf830c3 to your computer and use it in GitHub Desktop.
Iterate over multiple yaml files for jira-to-analytics.js
#! /bin/bash
process_yaml() {
conf=$1
echo "Processing" $conf
node jira-to-analytics.js -i $conf -o $(basename "$conf" .yaml).csv > /dev/null
echo
}
if [ "$#" -eq "1" ]; then
conf="$1.yaml"
if [ -f $conf ]; then
process_yaml $conf
else
echo "$conf not found";
exit 1
fi
else
for conf in $(ls *.yaml); do
process_yaml $conf
done
fi
@seize-the-dave
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment