Sha256: d8dc71fb2be31f51efde6276d37b892227b0027ca9d210753381ac7ed9b3a304

Contents?: true

Size: 778 Bytes

Versions: 11

Compression:

Stored size: 778 Bytes

Contents

#!/bin/bash

function sub {
  local bsource="$1"; shift
  local sub_base="$(basename "$bsource")"
  local bsource_cmd="$shome/libexec/${sub_base}"

  if [[ "$bsource_cmd" = "$bsource" ]]; then
    FLAGS_SUB="$FLAGS_TRUE"
    parse_command_line "$@" || exit $?
    eval set -- "${FLAGS_ARGV}"
  fi

  if [[ "$#" > 0 ]]; then
    if [[ ! "$1" =~ ^- ]]; then
      local sub_cmd="$(command -v "${sub_base}-$1" || true)"
      if [[ ! -x "$sub_cmd" ]]; then
        sub_cmd="$shome/libexec/${sub_base}-$1"
      fi

      if [[ -x "$sub_cmd" ]]; then
        shift
        exec "$sub_cmd" "$@"
      fi
    fi
  fi
 
  if [[ -x "$bsource_cmd" && "$bsource_cmd" != "$bsource" ]]; then
    exec "$bsource_cmd" "$@"
  else
    main "$@"
  fi
}

if [[ "$#" > 0 ]]; then
  sub "$@"  
fi

Version data entries

11 entries across 11 versions & 2 rubygems

Version Path
alpha_omega-1.2.1 sbin/_sub
boxcar-0.10005.1 bin/_sub
alpha_omega-1.2.0 sbin/_sub
alpha_omega-1.1.11 sbin/_sub
alpha_omega-1.1.10 sbin/_sub
alpha_omega-1.1.9 sbin/_sub
alpha_omega-1.1.7 sbin/_sub
alpha_omega-1.1.6 sbin/_sub
alpha_omega-1.1.5 sbin/_sub
alpha_omega-1.1.4 sbin/_sub
alpha_omega-1.1.3 sbin/_sub