Sha256: 5cc3a64c086bc6f8ae73cbb197131fea8f404fe888028698bf4e8c9a2807b7dd

Contents?: true

Size: 750 Bytes

Versions: 50

Compression:

Stored size: 750 Bytes

Contents

#!/bin/bash

#/ NAME
#/     stub-prepare -- prepares a new stub
#/
#/ SYNOPSIS
#/     stub prepare <new_command>

# figure out the project root under which bin, lib live
shome="$(cd -P -- "$(dirname -- "$BASH_SOURCE")/.." && pwd -P)"

# load a jason bourne library
source "$shome/libexec/_treadstone"

# entry point
function main {
  if [[ "$#" = 0 ]]; then
    logger_fatal "missing new command name"
    exit 1
  fi

  local dollar='$'
  local nm_command="$1"; shift

  ln -nfsv stub "$shome/bin/$nm_command"
  cp "$0" "$shome/libexec/$nm_command"
  chmod 755 "$shome/libexec/$nm_command"

  logger_info "$nm_command is stubbed at bin/$nm_command"
  logger_info "edit libexec/$nm_command for the actual script"
}

require 'sub' "$BASH_SOURCE" "$@"

Version data entries

50 entries across 50 versions & 1 rubygems

Version Path
alpha_omega-1.3.48 libexec/stub-prepare
alpha_omega-1.3.47 libexec/stub-prepare
alpha_omega-1.3.46 libexec/stub-prepare
alpha_omega-1.3.45 libexec/stub-prepare
alpha_omega-1.3.44 libexec/stub-prepare
alpha_omega-1.3.43 libexec/stub-prepare
alpha_omega-1.3.42 libexec/stub-prepare
alpha_omega-1.3.41 libexec/stub-prepare
alpha_omega-1.3.40 libexec/stub-prepare
alpha_omega-1.3.39 libexec/stub-prepare
alpha_omega-1.4.3 libexec/stub-prepare
alpha_omega-1.4.2 libexec/stub-prepare
alpha_omega-1.3.38 libexec/stub-prepare
alpha_omega-1.3.37 libexec/stub-prepare
alpha_omega-1.3.36 libexec/stub-prepare
alpha_omega-1.3.35 libexec/stub-prepare
alpha_omega-1.3.34 libexec/stub-prepare
alpha_omega-1.3.33 libexec/stub-prepare
alpha_omega-1.3.32 libexec/stub-prepare
alpha_omega-1.3.30 libexec/stub-prepare