From 58e94af4c31f434e40ea70d71e43be468a7bed83 Mon Sep 17 00:00:00 2001 From: Christopher Spinrath <admin@spinrath.net> Date: Fri, 26 Sep 2014 15:38:17 +0200 Subject: [PATCH] remaster_iso von uck auf lipck portiert --- legacy_scripts/customize_iso | 37 ------------------------------------ scripts/remaster_iso.sh | 20 +++++++++++++++++++ 2 files changed, 20 insertions(+), 37 deletions(-) delete mode 100755 legacy_scripts/customize_iso create mode 100755 scripts/remaster_iso.sh diff --git a/legacy_scripts/customize_iso b/legacy_scripts/customize_iso deleted file mode 100755 index 4565c03..0000000 --- a/legacy_scripts/customize_iso +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/bash -SCRIPT_DIR=`dirname "$0"` -REMASTER_HOME=${1:-~/tmp} -ISO_REMASTER_DIR="$REMASTER_HOME/remaster-iso" -REMASTER_DIR="$REMASTER_HOME/remaster-root" -ISO_DESCRIPTION_PREFIX_FILE="$SCRIPT_DIR/iso_description_prefix" - -if [ -e "$SCRIPT_DIR/customize_common" ]; then - source "$SCRIPT_DIR/customize_common" -fi - -function create_md5sums() -{ - pushd "$REMASTER_DIR" - find . -type f -print0 | sort -z | xargs -0 md5sum > "$REMASTER_HOME/rootfs.md5" - popd -} - -function write_iso_description() -{ - ISO_ARCH="32Bit" - if [ "$(uname -m)" == "x86_64" ]; then - ISO_ARCH="64Bit" - fi - - ISO_PREFIX="LIP ISO" - if [ -e "$ISO_DESCRIPTION_PREFIX_FILE" ]; then - ISO_PREFIX="$(cat $ISO_DESCRIPTION_PREFIX_FILE)" - fi - - echo "$ISO_PREFIX $ISO_ARCH" > "$SCRIPT_DIR/iso_description" -} - -#create_md5sums - -write_iso_description -patch_all "$SCRIPT_DIR/iso-patches/" "$ISO_REMASTER_DIR/" diff --git a/scripts/remaster_iso.sh b/scripts/remaster_iso.sh new file mode 100755 index 0000000..5b3cd0b --- /dev/null +++ b/scripts/remaster_iso.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +SCRIPT_DIR="$1" +ISO_REMASTER_DIR="$2" + +if [ ! -d "$SCRIPT_DIR" ]; then + echo "Expected lipck base path as first argument!" + exit 1 +fi + +if [ ! -d "$ISO_REMASTER_DIR" ]; then + echo "Expected target iso or target image root directory as second argument!" + exit 2 +fi + +if [ -e "$SCRIPT_DIR/scripts/common_functions.sh" ]; then + source "$SCRIPT_DIR/scripts/common_functions.sh" +fi + +patch_all "$SCRIPT_DIR/patches/iso/" "$ISO_REMASTER_DIR" -- GitLab