Skip to content

Instantly share code, notes, and snippets.

@halkeye
Created November 27, 2011 03:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save halkeye/1396870 to your computer and use it in GitHub Desktop.
Save halkeye/1396870 to your computer and use it in GitHub Desktop.
Script to generate project.list per user
#!/bin/sh
# https://gist.github.com/1396870
for i in $( grep gl-auth-command ~/.ssh/authorized_keys | awk '{print $2}' | awk -F'"' '{print $1}' | sort | uniq); do
/home/git/bin/gl-auth-command $i get-perms | sed 's/\r//' | awk '{if ($1 ~ /R/) { print $3 ".git"; }}' > /home/git/projects.list.$i;
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment