diff options
author | Jonathan Bauer | 2013-03-13 17:33:57 +0100 |
---|---|---|
committer | Jonathan Bauer | 2013-03-13 17:33:57 +0100 |
commit | 1efcd9ce0605ed8694f621b9889843ceca673b10 (patch) | |
tree | 92890797e88f3f4e7153811f800b3acf87aa62be /remote/setup_tools | |
parent | stage3.1 'debug' to drop a shell (diff) | |
download | tm-scripts-1efcd9ce0605ed8694f621b9889843ceca673b10.tar.gz tm-scripts-1efcd9ce0605ed8694f621b9889843ceca673b10.tar.xz tm-scripts-1efcd9ce0605ed8694f621b9889843ceca673b10.zip |
plymouth for stage3.1
Diffstat (limited to 'remote/setup_tools')
-rwxr-xr-x | remote/setup_tools | 49 |
1 files changed, 41 insertions, 8 deletions
diff --git a/remote/setup_tools b/remote/setup_tools index 63fa3f09..a009fdff 100755 --- a/remote/setup_tools +++ b/remote/setup_tools @@ -10,18 +10,27 @@ INIT_DIR="${MODULE_DIR}/stage3.2" # Keep track of processed modules PROCESSED_MODULES="" -initial_checks () -{ +initial_checks () { + + # check for target directory + [ -d $TARGET ] || perror "Given target directory does not exist: $TARGET" + [[ $TARGET == "${MODULE_DIR}"/build || $TARGET == "${MODULE_DIR}"/modules ]] && \ + perror "Target directory 'modules' invalid, used internally." + + + # check for required tools for BIN in git locate do local TEST=$(which ${BIN}) [ -z "$TEST" ] && pinfo "Installing $BIN..." && apt-get install $BIN done + + + } -read_config () -{ +read_config () { unset REQUIRED_BINARIES unset REQUIRED_LIBRARIES unset REQUIRED_DIRECTORIES @@ -43,8 +52,7 @@ read_config () fi } -read_build () -{ +read_build () { local BUILD_SCRIPT="${TOOL_DIR}/${TOOL}/${TOOL}.build" [ ! -e "${BUILD_SCRIPT}" ] && perror "Build script for specified tool not found." @@ -52,8 +60,7 @@ read_build () . "${BUILD_SCRIPT}" || perror "Sourcing '${BUILD_SCRIPT}' failed." } -copyfileswithdependencies () -{ +copyfileswithdependencies () { [ ! -d build ] && pinfo "No build directory found, skipping dependency copying" && return 0 cd build @@ -132,6 +139,32 @@ copyfileswithdependencies () fi } +generate_target() { + + [ "x$1" = "xstage31" -o "x$1" = "xstage32" ] || perror "generate_stage requires 'stage31' or 'stage32', but $1 given." + + initial_checks + + TARGET_DIR="${MODULE_DIR}/build/$1" + + + # copy basic libs + tarcopy "$(list_basic_libs)" "${MODULE_DIR}/build/$1" + + # if no arguments assume all. + if [ "x$1" = "x" -o "x$1" = "xall" ]; then + tools=$(ls ${TOOL_DIR}) + set -- $tools + fi + + # now iterate over given tools and copy them + while (( "$#" )); do + process_module "$1" + shift + done + TOOL_STR="" +} + generate_stage32 () { initial_checks |