From 3e09ac0c10c95bb24a08af62393b4f761e2743d0 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sat, 24 Aug 2013 09:54:45 +0000 Subject: initial commit --- bin/dtas-enq | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 bin/dtas-enq (limited to 'bin/dtas-enq') diff --git a/bin/dtas-enq b/bin/dtas-enq new file mode 100755 index 0000000..e8ebd66 --- /dev/null +++ b/bin/dtas-enq @@ -0,0 +1,13 @@ +#!/usr/bin/env ruby +# -*- encoding: binary -*- +# Copyright (C) 2013, Eric Wong +# License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt) +require 'dtas/unix_client' +c = DTAS::UNIXClient.new + +ARGV.each do |path| + # Unix paths are encoding agnostic + path = File.expand_path(path.b) + res = c.req_ok(%W(enq #{path})) + puts "#{path} #{res}" +end -- cgit v1.2.3-24-ge0c7