diff --git a/scripts/release.sh b/scripts/release.sh index 76c6155..c93868c 100644 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -2,69 +2,42 @@ # This script is used for creating CTAN archive of zhlipsum. -JOB_NAME=zhlipsum -WORKING_DIR=$PWD - -# Copy all the files to system temp folder, in order to use -# chmod correctly. -TEMP_DIR=/tmp/$JOB_NAME - -TDS_DIR=$TEMP_DIR/TDS -CTAN_DIR=$TEMP_DIR/$JOB_NAME - -SRC_DIR=$TDS_DIR/source/latex/$JOB_NAME -TEX_DIR=$TDS_DIR/tex/latex/$JOB_NAME -DOC_DIR=$TDS_DIR/doc/latex/$JOB_NAME - -DOC_EN_SCRIPT=$WORKING_DIR/scripts/get-doc-en.lua -ZHCONVERT_SCRIPT=$WORKING_DIR/scripts/zhconvert.sh - -mkdir -p $TEMP_DIR - -mkdir -p $TDS_DIR -mkdir -p $CTAN_DIR - -mkdir -p $SRC_DIR -mkdir -p $TEX_DIR -mkdir -p $DOC_DIR - -cp $WORKING_DIR/source/*.dtx $TEMP_DIR -cp $WORKING_DIR/source/*.pdf $TEMP_DIR - -cd $TEMP_DIR -xetex $JOB_NAME.dtx > /dev/null -texlua $DOC_EN_SCRIPT $JOB_NAME.dtx $JOB_NAME-en.tex -$ZHCONVERT_SCRIPT - -# All files should be rw-r--r-- -chmod 644 $TEMP_DIR/*.* - -cp $TEMP_DIR/*.dtx $SRC_DIR -cp $TEMP_DIR/*.ins $SRC_DIR -cp $TEMP_DIR/*.def $TEX_DIR -cp $TEMP_DIR/*.sty $TEX_DIR -cp $TEMP_DIR/*.md $DOC_DIR -cp $TEMP_DIR/*.tex $DOC_DIR -cp $TEMP_DIR/*.pdf $DOC_DIR - -# Make TDS zip -cd $TDS_DIR -zip -q -r -9 $JOB_NAME.tds.zip . - -cp $TEMP_DIR/*.dtx $CTAN_DIR -cp $TEMP_DIR/*.md $CTAN_DIR -cp $TEMP_DIR/*.pdf $CTAN_DIR - -rm $TEMP_DIR/*.* -cp $TDS_DIR/*.zip $TEMP_DIR -rm -r $TDS_DIR - -# Make CTAN zip -cd $TEMP_DIR -zip -q -r -9 $JOB_NAME.zip . - -cd $WORKING_DIR -cp -f $TEMP_DIR/$JOB_NAME.zip . -cp -f $TEMP_DIR/$JOB_NAME.tds.zip . - -rm -r $TEMP_DIR +module=zhlipsum +maindir=$PWD +builddir=$maindir/build +distribdir=$builddir/distrib +docdir=$builddir/doc +tdsdir=$distribdir/tds +unpackdir=$builddir/unpacked +ctandir=$distribdir/ctan/$module +tds_docdir=$tdsdir/doc/latex/$module +tds_srcdir=$tdsdir/src/latex/$module +tds_texdir=$tdsdir/tex/latex/$module + +rm -rf $distribdir +if [ "$1" == "--build-doc" ]; then + l3build doc +fi + +mkdir -p $ctandir $tds_docdir $tds_srcdir $tds_texdir + +cp $docdir/*.pdf $ctandir +cp $unpackdir/*.md $ctandir +cp $unpackdir/*.dtx $ctandir + +cp $docdir/*.pdf $tds_docdir +cp $docdir/*.tex $tds_docdir +cp $unpackdir/*.md $tds_docdir +cp $unpackdir/*.dtx $tds_srcdir +cp $unpackdir/*.ins $tds_srcdir +cp $unpackdir/*.sty $tds_texdir +cp $unpackdir/*.def $tds_texdir + +cd $tdsdir +zip -q -r -9 $module.tds.zip . + +cd $ctandir/.. +cp $tdsdir/$module.tds.zip . +zip -q -r -9 $module.zip . + +cp -f *.zip $maindir diff --git a/zhlipsum.dtx b/zhlipsum.dtx index 4c98483..f6e0c1b 100644 --- a/zhlipsum.dtx +++ b/zhlipsum.dtx @@ -183,7 +183,7 @@ Copyright (C) 2017–2020 by Xiangdong Zeng . %\NeedsTeXFormat{LaTeX2e} %\RequirePackage{expl3} %<*!(driver|install)> -%\GetIdInfo $Id: zhlipsum.dtx 1.1.1 2018-09-08 12:00:00Z Xiangdong Zeng $ +%\GetIdInfo $Id: zhlipsum.dtx 1.2.0 2020-04-10 12:00:00Z Xiangdong Zeng $ % {Chinese dummy text} %\ProvidesExplPackage{\ExplFileName} % {Chinese dummy text with UTF-8 encoding (for zhlipsum)} @@ -195,7 +195,6 @@ Copyright (C) 2017–2020 by Xiangdong Zeng . % {\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} % %<*driver> -\PassOptionsToPackage{showframe}{geometry} %^^A! \PassOptionsToPackage{scheme=plain, linespread=1.1}{ctex} %^^A+ \documentclass{ctxdoc} @@ -302,11 +301,11 @@ Copyright (C) 2017–2020 by Xiangdong Zeng . % % \title{\textbf{zhlipsum: 中文乱数假文(Lorem ipsum)}} % \author{曾祥东} -% \date{2018/09/08 \quad v1.1.1^^A +% \date{2020/04/10 \quad v1.2.0^^A % \thanks{\url{https://github.com/stone-zeng/zhlipsum}.}} %^^A! \title{\textbf{The \pkg{zhlipsum} Package: Chinese Dummy Text}} %^^A! \author{Xiangdong Zeng} -%^^A! \date{2018/09/08 \quad v1.1.1% +%^^A! \date{2020/04/10 \quad v1.2.0% %^^A! \thanks{\url{https://github.com/stone-zeng/zhlipsum}.}} %^^A! % @@ -430,7 +429,7 @@ Copyright (C) 2017–2020 by Xiangdong Zeng . %^^A! % %^^A+ -% \begin{function}[updated=2018-04-08]{\zhlipsum} +% \begin{function}[updated=2020-04-08]{\zhlipsum} %^^A- % \begin{syntax} % \cs{zhlipsum}\oarg{段落}\oarg{选项} @@ -449,11 +448,11 @@ Copyright (C) 2017–2020 by Xiangdong Zeng . %^^A! \end{function} %^^A! % -% 默认情况下,不带星号的命令 \cs{zhlipsum} 会在假文段落之前、之后与 -% 之间进行分段(即插入 \tn{par}),而带星号的命令 \cs{zhlipsum}|*| +% 默认情况下,不带星号的命令 \cs{zhlipsum} 会在假文段落之后与之间 +% 进行分段(即插入 \tn{par}),而带星号的命令 \cs{zhlipsum}|*| % 则不做额外处理。您可以利用后文给出的 \opt{before}、\opt{after}、 % \opt{inter} 选项来更改默认设置。 -%^^A! By default, the \cs{zhlipsum} command will insert \tn{par} before, +%^^A! By default, the \cs{zhlipsum} command will insert \tn{par} %^^A! after and between dummy text paragraphs, while \cs{zhlipsum}|*| %^^A! will not give any extra processing. To change the default %^^A! behavior, you can use the \opt{before}, \opt{after} and