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}"