]> Cypherpunks.ru repositories - prepro.git/blobdiff - mk-mod
Trivial style fixes
[prepro.git] / mk-mod
diff --git a/mk-mod b/mk-mod
index 1d9332ab197aeecf24e3a1829ef7daa0f8ed5929988da00d4a5a2c0d26fe4290..6fb58f6951c81a767bbd8677cf20f4ab4c5ba4950f0bc37998106b96dcf5ced3 100755 (executable)
--- 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
     }