From ca642b0dad8c5ee1ec9d172eae534dacd79d9410 Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Sun, 27 Jul 2014 12:30:00 -0400 Subject: initial commit --- asp.in | 246 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 246 insertions(+) create mode 100644 asp.in (limited to 'asp.in') diff --git a/asp.in b/asp.in new file mode 100644 index 0000000..5393823 --- /dev/null +++ b/asp.in @@ -0,0 +1,246 @@ +#!/bin/bash + +ARCH_GIT_REPOS=(packages community) + +OPT_ARCH=$(uname -m) +OPT_FORCE=0 +: ${ASPROOT:=$HOME/asp} + +m4_include(remote.inc.sh) +m4_include(package.inc.sh) + +log_meta() { + printf "$1 $2\n" "${@:3}" +} + +log_error() { + log_meta 'error:' "$@" >&2 +} + +log_fatal() { + log_error "$@" + exit 1 +} + +log_warning() { + log_meta 'warning:' "$@" >&2 +} + +log_info() { + log_meta '==>' "$@" +} + +map() { + local map_r=0 + for _ in "${@:2}"; do + "$1" "$_" || (( $# > 255 ? map_r=1 : ++r )) + done + return $map_r +} + +usage() { + cat<