From bb425b6d6f5e72758c22b8aef21f1dc6b9f906fb Mon Sep 17 00:00:00 2001 From: Mario Fetka Date: Sat, 31 Aug 2013 21:50:40 +0200 Subject: [PATCH] correct write of svcpack config file --- builder-targets-cb.sh | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/builder-targets-cb.sh b/builder-targets-cb.sh index 270f016..25c88b9 100644 --- a/builder-targets-cb.sh +++ b/builder-targets-cb.sh @@ -35,6 +35,14 @@ function retrieve() { builder_retrieve } +write_svcpack_file() { + local control_file=$1 + local control_section=$2 + local control_option=$3 + local control_value=$4 + + sed -i -e "/^\[$control_section\]/,/^\[.*\]/ s|^\($control_option[ \t]*=[ \t]*\).*$|\1$control_value|" "$control_file" +} function create() { @@ -234,7 +242,11 @@ function create() { mv -v $INST_DIR/CLIENT_DATA/AIO_7zip_config.txt $INST_DIR/CLIENT_DATA/X86/sereby/svcpack/7zip_config.txt cat $INST_DIR/CLIENT_DATA/X86/7ZipSFX/7zsd_All.sfx $INST_DIR/CLIENT_DATA/X86/sereby/svcpack/7zip_config.txt $INST_DIR/CLIENT_DATA/X86/sereby/svcpack/aio-runtimes.7z > $INST_DIR/CLIENT_DATA/X86/sereby/svcpack/aio-runtimes.exe rm $INST_DIR/CLIENT_DATA/X86/sereby/svcpack/7zip_config.txt $INST_DIR/CLIENT_DATA/X86/sereby/svcpack/aio-runtimes.7z - ini-set $INST_DIR/CLIENT_DATA/X86/sereby/entries_AiORuntimes.ini --general builddate=`date +"%d.%m.%Y"` version=$VERSION title="Sereby's AiO Runtimes with Geos One's Mods" website=http://opsi.disconnected-by-peer.at + SVCDATE=`date +"%d.%m.%Y"` + write_svcpack_file $INST_DIR/CLIENT_DATA/X86/sereby/entries_AiORuntimes.ini "general" "version" "${VERSION}" + write_svcpack_file $INST_DIR/CLIENT_DATA/X86/sereby/entries_AiORuntimes.ini "general" "builddate" "${SVCDATE}" + write_svcpack_file $INST_DIR/CLIENT_DATA/X86/sereby/entries_AiORuntimes.ini "general" "title" "Sereby's AiO Runtimes with Geos One's Mods" + write_svcpack_file $INST_DIR/CLIENT_DATA/X86/sereby/entries_AiORuntimes.ini "general" "website" "http://opsi.disconnected-by-peer.at" mkdir -p $OPSI_REPOS_PRODUCT_DIR 7z a $OPSI_REPOS_PRODUCT_DIR/$OPSI_REPOS_FILE_PATTERN.7z $INST_DIR/CLIENT_DATA/X86/sereby/* fi