From f2f94633da022ee6980db7ce5622db852d9addac Mon Sep 17 00:00:00 2001 From: Mirko Vogt Date: Sun, 2 May 2010 23:27:11 +0200 Subject: [PATCH] function should be defined before being called --- scripts/reflash_ben.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/reflash_ben.sh b/scripts/reflash_ben.sh index 14cca1805..15d77c203 100644 --- a/scripts/reflash_ben.sh +++ b/scripts/reflash_ben.sh @@ -89,6 +89,11 @@ fi mkdir -p ${WORKING_DIR} date > "${LOG_FILE}" # purge logfile if exists +function log() { + echo "$1" + echo "$1" >> "${LOG_FILE}" +} + function abort() { log "$1" log "===" @@ -96,11 +101,6 @@ function abort() { exit 1 } -function log() { - echo "$1" - echo "$1" >> "${LOG_FILE}" -} - [ "$(whoami)" == "root" ] || abort "this script must be run as root" log "working dir: ${WORKING_DIR}"