Sha256: f1e747cb44809c0eb77565da7711908a9596081461018f2593dbbf4de2c8a586
Contents?: true
Size: 775 Bytes
Versions: 10
Compression:
Stored size: 775 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 cp "$shome/libexec/stub" "$shome/libexec/$nm_command" ln -nfsv $nm_command "$shome/bin/$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
10 entries across 10 versions & 1 rubygems