From 61fc766d07e5252b9618c6548ea714649ab54a54 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Wed, 15 Jun 2016 13:03:50 -0400 Subject: Pull tool configuration into a hackers-git.yml --- bin/uid-map | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'bin/uid-map') diff --git a/bin/uid-map b/bin/uid-map index 90dd472..26765fa 100755 --- a/bin/uid-map +++ b/bin/uid-map @@ -1,10 +1,10 @@ #!/usr/bin/env ruby # Usage: uid-map -require 'yaml' +load "#{File.dirname(__FILE__)}/common.rb" -users = Dir.glob("users/*.yml").each do |filename| - uid = filename.sub(/users\/([0-9]*)\.yml/, "\\1").to_i - user = YAML::load(open(filename)) +users = Dir.glob("#{cfg["yamldir"]}/*.yml").each do |filename| + uid = File.basename(filename).sub(/^([0-9]*)\.yml$/, "\\1").to_i + user = load_user_yaml(filename) puts "#{uid}:#{user["username"]}" end -- cgit v1.2.3-54-g00ecf