Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

executable file 20 lines (14 sloc) 0.379 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
#!/bin/bash

die () {
    filenames=($(ls -F scripts | grep '*' | sed -e 's/.sh\*//'))
    scripts=$(printf '\t%s\n' "${filenames[@]}")
    echo >&2 "$@\n\n\
usage: $0 script-name [args ...]\n\n\
Available scripts:\n$scripts"
    exit 1
}

[ $# -lt 1 ] && die "No script specified."

script=./scripts/$1.sh

[ -x $script ] || die "Could not execute: $script"

shift 1
$script $@
Something went wrong with that request. Please try again.