From: Sergey Matveev Date: Sun, 18 Feb 2024 18:44:05 +0000 (+0300) Subject: Trivial style fixes X-Git-Url: http://www.git.cypherpunks.ru/?a=commitdiff_plain;h=c2c87eb6ba35824afacd09de9637dd4c8834a5a9d1fc5352c410391f7a2797b5;p=prepro.git Trivial style fixes --- diff --git a/list-vers b/list-vers index e9a5358..e551e8a 100755 --- a/list-vers +++ b/list-vers @@ -1,6 +1,6 @@ #!/usr/bin/env zsh -set -e +setopt ERR_EXIT vcs=$1 mod=$2 cd $vcs diff --git a/mk-html b/mk-html index 850103e..4c472a8 100755 --- a/mk-html +++ b/mk-html @@ -1,6 +1,6 @@ #!/usr/bin/env zsh -set -e +setopt ERR_EXIT vcsurl=$1 modname=$2 @@ -9,7 +9,7 @@ cols=(${(s#/#)modname}) [[ ${cols[-1]} =~ v[0-9]+ ]] || cols=($cols v1) moddir=${(j:/:)cols[1,-2]} v=${cols[-1]} -[[ -s $moddir/$v ]] && exit +[[ ! -s $moddir/$v ]] || exit 0 mkdir -p $moddir cat > $moddir/$v < diff --git a/mk-htmls b/mk-htmls index 93a3866..fd763aa 100755 --- a/mk-htmls +++ b/mk-htmls @@ -1,6 +1,6 @@ #!/usr/bin/env zsh -set -e +setopt ERR_EXIT root=$0:h:a vcsurl=$1 vcspath=$2 diff --git a/mk-list b/mk-list index 67cbc44..fcf0cad 100755 --- a/mk-list +++ b/mk-list @@ -1,7 +1,6 @@ #!/usr/bin/env zsh -set -e -setopt EXTENDED_GLOB +setopt ERR_EXIT EXTENDED_GLOB for d (**/*(/)) { list=() for f ($d/*.info(onN)) list=($list $f:t:r) diff --git a/mk-mod b/mk-mod index 1d9332a..6fb58f6 100755 --- a/mk-mod +++ b/mk-mod @@ -1,6 +1,6 @@ #!/usr/bin/env zsh -set -e +setopt ERR_EXIT vcsurl=$1 vcspath=$2 @@ -11,15 +11,15 @@ signkey=$5 dst=$modname/@v mkdir -p $dst cd $dst -[[ -s $version.zip ]] && exit +[[ ! -s $version.zip ]] || exit 0 root=$0:h:a zipcreate=$root/zip-create ziphash=$root/zip-hash zmodload -F zsh/datetime b:strftime git -C $vcspath cat-file -p $version | while read line ; do - [[ $line =~ ^object ]] && hsh=${${=line}[-1]} - [[ $line =~ ^tagger ]] && { + [[ ! $line =~ ^object ]] || hsh=${${=line}[-1]} + [[ ! $line =~ ^tagger ]] || { strftime -s sec -r "%s %z" "${${=line}[-2,-1]}" break } diff --git a/mk-mods b/mk-mods index dc72176..8f56511 100755 --- a/mk-mods +++ b/mk-mods @@ -1,6 +1,6 @@ #!/usr/bin/env zsh -set -e +setopt ERR_EXIT root=$0:h:a vcsurl=$1 vcspath=$2