From 22049e547541075c272582e7e39cb2299d47b7d6 Mon Sep 17 00:00:00 2001 From: sam Date: Thu, 7 Sep 2023 02:17:48 +0200 Subject: [PATCH] Carica file su '' --- ci@update | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 ci@update diff --git a/ci@update b/ci@update new file mode 100644 index 0000000..6f99dca --- /dev/null +++ b/ci@update @@ -0,0 +1,28 @@ +#!/bin/sh +CONF_PATH=.comicinfo +FILE=ComicInfo.xml +BACKUP=${FILE}_BACKUP +LANG=$CONF_PATH/LanguageISO +if [ ! -d $CONF_PATH ] +then +mkdir -p $CONF_PATH +ln -sf ../$CONF_PATH/* $CONF_PATH +rm -f $CONF_PATH/Number $CONF_PATH/Volume $LANG +fi +if [ -f $FILE ] +then +cp $FILE $BACKUP +fi +if [ -f $LANG ] +then +echo "(A language code describing the language of the book. +Without any information on what kind of code this element is supposed to contain, it is recommended to use the IETF BCP 47 language tag, which can describe the language but also the script used. This helps to differentiate languages with multiple scripts, like Traditional and Simplified Chinese.) :" +read VAR +echo $VAR > $LANG +fi +for file in *.cbz; do N=$(echo ${file: -6:2}| sed 's/^0//') && ci@set Number $N && ci@set Volume $N && ci@gen -f && cat $FILE && zip -rv $file $FILE; done +rm -f $CONF_PATH/Number $CONF_PATH/Volume $LANG +if [ -f $BACKUP ] +then +mv -f $BACKUP $FILE +fi