From: Mike D. Lowis Date: Mon, 19 Mar 2012 13:36:17 +0000 (-0400) Subject: Added bci prototype and language design prototypes X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=81992e5376056adf6bc0e7e7fed6fc4be1f6f499;p=archive%2Fbitbucket.git Added bci prototype and language design prototypes --- diff --git a/bash/bci.sh b/bash/bci.sh new file mode 100644 index 0000000..1572f63 --- /dev/null +++ b/bash/bci.sh @@ -0,0 +1,204 @@ +#!/bin/env bash + +START_BACKGROUND=0 +START_CI=0 +CONF_FILE=./repos +IDLE_TIME=5m +#ngfnote: i prefer $(pwd) to using backticks; don't think it makes a difference. +WORKING_DIR=`pwd` +REPO_LIST=() + +#ngfnote: i prefer to do something like +#GIT="$(which git)" +#: ${GIT:?'git not found in path!'} +#then use '$GIT' instead of 'git' in code + +#ngfnote, i'm sure you already know this, but cat <<-EOF will allow you to put +#indentation in before the lines being catted +#unfortunately, to get formatting of the cat correct, this requires you to mix tabs and spaces +#which is a no-no. +#alternatively, i've gotten in the habit of putting this in a USAGE file then doing something like +#usage(){ cat $USAGE_FILE } +usage() { +cat << EOF +usage $0 + +This script implements a primitive continuous integration server. + +Options: + -c Use the given configuration file + -d Set the working directory for this script + -B Launch this script in the background + -h Prints usage message + -S Start the service in the foreground (do not daemonize) + -t