#!/bin/sh # # Initial port bootstrap scripts # bootstrap-main.sh # Runs the other scripts to perform a full bootstrap. # # Copyright (C) 2013 Patrick "P. J." McDermott # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . set -e SCRIPT_DIR= main() { SCRIPT_DIR="$(cd "${0%/*}" && pwd)" DATE="$(date '+%Y-%m-%d_%H:%M:%S')" [ -d logs ] || mkdir logs { time -p "${SCRIPT_DIR}/bootstrap-prepare.sh"; } \ >"logs/${DATE}_prepare.log" 2>&1 { time -p "${SCRIPT_DIR}/bootstrap-stage1-build.sh"; } \ >"logs/${DATE}_stage1-build.log" 2>&1 { time -p "${SCRIPT_DIR}/bootstrap-stage1-install.sh"; } \ >"logs/${DATE}_stage1-install.log" 2>&1 { time -p "${SCRIPT_DIR}/bootstrap-stage1-test.sh"; } \ >"logs/${DATE}_stage1-test.log" 2>&1 { time -p "${SCRIPT_DIR}/bootstrap-stage2-build.sh"; } \ >"logs/${DATE}_stage2-build.log" 2>&1 { time -p "${SCRIPT_DIR}/bootstrap-stage2-install.sh"; } \ >"logs/${DATE}_stage2-install.log" 2>&1 { time -p "${SCRIPT_DIR}/bootstrap-stage2-test.sh"; } \ >"logs/${DATE}_stage2-test.log" 2>&1 { time -p "${SCRIPT_DIR}/bootstrap-stage3-build.sh"; } \ >"logs/${DATE}_stage3-build.log" 2>&1 } main "${@}"