Sha256: ef900420d01a781dd6587c1ca296f41beb57d9b5143431adf3281af1ded805c8

Contents?: true

Size: 635 Bytes

Versions: 1

Compression:

Stored size: 635 Bytes

Contents

#!/usr/bin/env ruby
# frozen_string_literal: true

def wait
  Process.wait
rescue Interrupt
  retry
end

def main(argv)
  libexec = File.realpath File.join(__dir__, "..", "libexec", "quran-audio")
  case argv[0]
  when "pull"
    Process.spawn File.join(libexec, "pull"), *ARGV[1..]
    Process.wait
  when "ls"
    Process.spawn File.join(libexec, "ls"), *ARGV[1..]
    Process.wait
  else
    warn "Usage: quran-audio [COMMAND] [OPTIONS]\n\n" \
         "Commands:\n" \
         "  pull              Pull MP3 files from everyayah.com\n" \
         "  ls                List reciters\n" \
  end
rescue Interrupt
  wait
end
main(ARGV)

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
quran-audio-0.3.3 bin/quran-audio