Sha256: 747c2716355cca28e393c5086df46a04e96bc879ceb4c9130d47520112b74b43

Contents?: true

Size: 640 Bytes

Versions: 5

Compression:

Stored size: 640 Bytes

Contents

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

def wait
  Process.wait
rescue Interrupt
  retry
end

def libexec
  File.realpath File.join(__dir__, "..", "libexec", "quran-audio")
end

def main(argv)
  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              Download recitations\n" \
         "  ls                List available recitations\n"
  end
rescue Interrupt
  wait
end
main(ARGV)

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
quran-audio-0.5.1 bin/quran-audio
quran-audio-0.5.0 bin/quran-audio
quran-audio-0.4.2 bin/quran-audio
quran-audio-0.4.1 bin/quran-audio
quran-audio-0.4.0 bin/quran-audio