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
# Copy of https://gist.github.com/antonio/4586456 | |
# With a modification to collect all the branch names so we can make one git request | |
# Set DRY_RUN=1 to get an echo of the command | |
# Format that works with `git log --since`, e.g. 2018-01-01 | |
date=$1 | |
branches= | |
for branch in $(git branch -a | sed 's/^\s*//' | sed 's/remotes\///' | grep feature | grep -v 'master$'); do | |
if [[ "$(git log $branch --since $date | wc -l)" -eq 0 ]]; then |
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
IFS="$(printf '\n\t')" | |
mkdir -p ~/.ssh | |
if ! [[ -f ~/.ssh/authorized_keys ]]; then | |
echo "Creating new ~/.ssh/authorized_keys" | |
touch ~/.ssh/authorized_keys | |
fi | |
user=$1 |