Skip to content

Instantly share code, notes, and snippets.

@tyler-sommer
Created October 17, 2014 17:52
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save tyler-sommer/f692830ab1d1089e6d27 to your computer and use it in GitHub Desktop.
Save tyler-sommer/f692830ab1d1089e6d27 to your computer and use it in GitHub Desktop.
Fix broken gitlab hooks in your project repositories
Dir.glob('/home/git/repositories/**/*.git') do |item|
hook = "#{item}/hooks"
if not File.symlink?(hook)
puts "Updating #{hook}"
File.rename(hook, "#{hook}.old")
File.symlink("/home/git/gitlab-shell/hooks", hook)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment