Skip to content

Instantly share code, notes, and snippets.

@zph
Created November 23, 2014 00:56
Show Gist options
  • Select an option

  • Save zph/f86c3942caeeaefd8eaf to your computer and use it in GitHub Desktop.

Select an option

Save zph/f86c3942caeeaefd8eaf to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
set -eou pipefail
readonly USERNAME="$1"
if [[ $(grep "$USERNAME" whitelist.txt ) ]];then
echo "Already on list"
exit 2
else
echo "$USERNAME" >> whitelist.txt
git add whitelist.txt
git commit -m "Add $USERNAME to whitelist based on Appeal Group decision"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment