From f7f163034c50ff1b4bad6cb8e5aa5610d54dc0aa Mon Sep 17 00:00:00 2001 From: Ward Wouts Date: Fri, 24 Apr 2026 15:13:36 +0200 Subject: [PATCH] just a skeleton --- list_same/list_same.rb | 68 ------------------------------------------ 1 file changed, 68 deletions(-) delete mode 100755 list_same/list_same.rb diff --git a/list_same/list_same.rb b/list_same/list_same.rb deleted file mode 100755 index 6fc507a..0000000 --- a/list_same/list_same.rb +++ /dev/null @@ -1,68 +0,0 @@ -#!/usr/bin/env ruby - -# -# Copyright (c) 2012 Ward Wouts -# -# Permission to use, copy, modify, and distribute this software for any -# purpose with or without fee is hereby granted, provided that the above -# copyright notice and this permission notice appear in all copies. -# -# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -# - -require 'getoptlong' - -def usage - puts < - --u sth with argument - --d delete resulting files --e escape output filenames with backslashes --h, --help show this message --l hardlink resulting files (no change if on - different filesystems) --m mp3 compare, ignores ID3 tags (slow) --s skip the first entry for doubles - -EOT - exit -end - -def cmdline - options = Hash.new - begin - opts = GetoptLong.new( - [ "-d", GetoptLong::REQUIRED_ARGUMENT ], - [ "-e", GetoptLong::REQUIRED_ARGUMENT ], - [ "-h", "--help", GetoptLong::NO_ARGUMENT ], - [ "-l", GetoptLong::REQUIRED_ARGUMENT ], - [ "-m", GetoptLong::REQUIRED_ARGUMENT ], - [ "-s", GetoptLong::REQUIRED_ARGUMENT ] - ) - opts.quiet=true - - opts.each do |opt, arg| - options[opt] = arg - end - - rescue - print "#{$!}\n" - usage - end - if options["-h"] - usage - end - return options -end - -options = cmdline -file = ARGV[0] -