Skip to content

Commit

Permalink
step version: v1.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
stone-zeng committed Apr 9, 2020
1 parent 64973b6 commit 46d4a87
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 74 deletions.
105 changes: 39 additions & 66 deletions scripts/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
15 changes: 7 additions & 8 deletions zhlipsum.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ Copyright (C) 2017&ndash;2020 by Xiangdong Zeng <[email protected]>.
%<package>\NeedsTeXFormat{LaTeX2e}
%<package>\RequirePackage{expl3}
%<*!(driver|install)>
%<!readme>\GetIdInfo $Id: zhlipsum.dtx 1.1.1 2018-09-08 12:00:00Z Xiangdong Zeng <[email protected]> $
%<!readme>\GetIdInfo $Id: zhlipsum.dtx 1.2.0 2020-04-10 12:00:00Z Xiangdong Zeng <[email protected]> $
%<package> {Chinese dummy text}
%<package>\ProvidesExplPackage{\ExplFileName}
%<utf8> {Chinese dummy text with UTF-8 encoding (for zhlipsum)}
Expand All @@ -195,7 +195,6 @@ Copyright (C) 2017&ndash;2020 by Xiangdong Zeng <[email protected]>.
%<!readme> {\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
%</!(driver|install)>
%<*driver>
\PassOptionsToPackage{showframe}{geometry}
%^^A! \PassOptionsToPackage{scheme=plain, linespread=1.1}{ctex}
%^^A+
\documentclass{ctxdoc}
Expand Down Expand Up @@ -302,11 +301,11 @@ Copyright (C) 2017&ndash;2020 by Xiangdong Zeng <[email protected]>.
%
% \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!
%
Expand Down Expand Up @@ -430,7 +429,7 @@ Copyright (C) 2017&ndash;2020 by Xiangdong Zeng <[email protected]>.
%^^A!
%
%^^A+
% \begin{function}[updated=2018-04-08]{\zhlipsum}
% \begin{function}[updated=2020-04-08]{\zhlipsum}
%^^A-
% \begin{syntax}
% \cs{zhlipsum}\oarg{段落}\oarg{选项}
Expand All @@ -449,11 +448,11 @@ Copyright (C) 2017&ndash;2020 by Xiangdong Zeng <[email protected]>.
%^^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
Expand Down

0 comments on commit 46d4a87

Please sign in to comment.