Skip to content

Instantly share code, notes, and snippets.

@kremerben
Created October 31, 2018 18:26
Show Gist options
  • Save kremerben/3d2189c6cb981f346b60cb44be9ff2a3 to your computer and use it in GitHub Desktop.
Save kremerben/3d2189c6cb981f346b60cb44be9ff2a3 to your computer and use it in GitHub Desktop.
Function to add to ~/.bash_aliases to update the ADR dashboard
adrdash ()
{
networksetup -connectpppoeservice "L2TP VPN";
open smb://username:password@192.168.25.13/Share/;
workon adr-dashboard;
git status;
git diff;
read -r -p "Everything good? Continue? [y/N] " response;
if [[ "$response" =~ ^([yY][eE][sS]|[yY])+$ ]]; then
echo 'Continuing\n';
git checkout ADR-189_budget_program_year_from_adrincappid;
git pull ADR-189_budget_program_year_from_adrincappid;
cd py;
python 0_integrity.py;
python 1a_program_dashboard.py;
git status;
cd ../;
git add .;
git status;
read -r -p "Everything still good? Continue with committing? [y/N] " response;
if [[ "$response" =~ ^([yY][eE][sS]|[yY])+$ ]]; then
echo 'Continuing\n';
git commit -am "End of $(date +'%B %Y') refresh";
echo "If all that looks good cut and paste:";
echo "git push origin ADR-189_budget_program_year_from_adrincappid";
else
echo 'no :: exiting (2)';
fi;
else
echo 'no :: exiting (1)';
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment