diff options
author | Simon Rettberg | 2014-01-02 19:36:42 +0100 |
---|---|---|
committer | Simon Rettberg | 2014-01-02 19:36:42 +0100 |
commit | 61c9b1c97b1f5d07183987c2256637e523d1ff17 (patch) | |
tree | 5c5fa89bb09873edceae121c2222948083636972 /server/export_target | |
parent | <setup_target> Add check for changed .build/.conf file of modules, autoclean ... (diff) | |
download | tm-scripts-61c9b1c97b1f5d07183987c2256637e523d1ff17.tar.gz tm-scripts-61c9b1c97b1f5d07183987c2256637e523d1ff17.tar.xz tm-scripts-61c9b1c97b1f5d07183987c2256637e523d1ff17.zip |
!! Split up 'mltk' into 'mltk' and 'openslx' !!
'mltk remote' is now 'mltk'
'mltk server' is now 'openslx'
Also changed the export type (-e) stage31 to 'cpio'
and stage32 and addons to 'sqfs'
It should describe what it's packed as, not what the meaning
of the content is; you can already tell from the file name.
Diffstat (limited to 'server/export_target')
-rwxr-xr-x | server/export_target | 44 |
1 files changed, 14 insertions, 30 deletions
diff --git a/server/export_target b/server/export_target index 906c5cdc..c5fae7f4 100755 --- a/server/export_target +++ b/server/export_target @@ -39,7 +39,7 @@ copy_kernel() { pinfo "Copying kernel from ${REMOTE_IP} to ${SERVER_BOOT_DIR}/kernel/" if [ -d ${SERVER_BUILD_DIR}/kernel ]; then cd ${SERVER_BUILD_DIR} - tarcopy kernel ${SERVER_BOOT_DIR} + tarcopy "kernel" "${SERVER_BOOT_DIR}" cd - &> /dev/null fi } @@ -59,27 +59,6 @@ sync_remote() { fi } -generate_stage32() { - local TOOL_STR="${TOOL_STR} generate_stage32:" - rm -f "${SERVER_BOOT_DIR}/${TARGET}.sqfs" - pinfo "Writing '${TARGET}.sqfs' to '${SERVER_BOOT_DIR}/${TARGET}.sqfs'" - mksquashfs "${SERVER_BUILD_DIR}/${TARGET}/" "${SERVER_BOOT_DIR}/${TARGET}.sqfs" -comp xz -b 1M -no-recovery >&6 || perror "mksquashfs failed ($?)." - pinfo "Created '${SERVER_BOOT_DIR}/${TARGET}.sqfs'." -} - -generate_stage31() { - local TOOL_STR="${TOOL_STR} generate_stage31:" - pinfo "Writing 'initramfs-${TARGET}' to '${SERVER_BOOT_DIR}'" - generate_initramfs "${SERVER_BUILD_DIR}/${TARGET}" "." "${SERVER_BOOT_DIR}/initramfs-${TARGET}" -} - -generate_addons() { - local TOOL_STR="${TOOL_STR} generate_addons:" - pinfo "Writing '${TARGET}.sqfs' to '${SERVER_BOOT_DIR}/${TARGET}.sqfs'" - [ -e "${SERVER_BOOT_DIR}/${TARGET}.sqfs" ] && rm "${SERVER_BOOT_DIR}/${TARGET}.sqfs" - mksquashfs "${SERVER_BUILD_DIR}/${TARGET}/" "${SERVER_BOOT_DIR}/${TARGET}.sqfs" -comp xz -b 1M -no-recovery >&6 || perror "mksquashfs failed ($?)." -} - generate_config() { # generate config from the target directory local TOOL_STR="${TOOL_STR} generate_config:" @@ -159,19 +138,24 @@ export_target() { copy_kernel TARGET=$1 - [ -d ${SERVER_BUILD_DIR}/${TARGET} ] || perror "Given target directory does not exist: ${SERVER_BUILD_DIR}/${TARGET}" + [ -z "$TARGET" ] && perror "No target passed to export_target()" + [ -d "${SERVER_BUILD_DIR}/${TARGET}" ] || perror "Given target directory does not exist: ${SERVER_BUILD_DIR}/${TARGET}" case "$2" in - stage31) - generate_stage31 + cpio) + local TOOL_STR="${TOOL_STR} generate_initramfs:" + pinfo "Writing 'initramfs-${TARGET}' to '${SERVER_BOOT_DIR}/'" + generate_initramfs "${SERVER_BUILD_DIR}/${TARGET}/" "." "${SERVER_BOOT_DIR}/initramfs-${TARGET}" ;; - stage32) - generate_stage32 + sqfs) + local TOOL_STR="${TOOL_STR} generate_squashfs:" + pinfo "Creating '${TARGET}.sqfs' in '${SERVER_BOOT_DIR}/'" + generate_squashfs "${SERVER_BUILD_DIR}/${TARGET}/" "${SERVER_BOOT_DIR}/${TARGET}.sqfs" ;; - addons) - generate_addons + *) + perror "Invalid export format: $2" ;; - esac + esac } |