From 65542c7a005fb5ae8b0bab12b04ea741b1453aae Mon Sep 17 00:00:00 2001 From: CyberLeo Date: Fri, 15 Oct 2010 12:23:43 -0500 Subject: [PATCH] script/makeworld: use shlib for common functions --- script/makeworld | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/script/makeworld b/script/makeworld index 795357c..beada88 100755 --- a/script/makeworld +++ b/script/makeworld @@ -1,5 +1,15 @@ #!/bin/sh +# Boilerplate +_root="$(dirname "${0}")"; . "${_root}/lib/env.sh" + +# Load needed modules +want root log + +alias meh=log +alias omg=warn +alias wtf=err + # Root directory of makeworld ROOT="$(realpath "$(dirname "${0}")/../worlds")" @@ -38,9 +48,6 @@ phases="${phases:-buildworld buildkernel distrib-dirs installworld installkernel date="$(date +%Y%m%d)" # Functions -meh() { printf " \033[1;32m*\033[0m %s\n" "${*}"; } -omg() { printf " \033[1;33m*\033[0m %s\n" "${*}"; } -wtf() { printf " \033[1;31m* FAIL\033[0m %s\n" "${*}"; exit 1; } # Prepare chroot for build prepare() { -- 2.42.0