From 21288bd5c5710dfe7f3edf25195fb050b4790150 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Mon, 4 Sep 2017 09:52:44 +0900 Subject: update.sh: actual accept do_collection --- update.sh | 49 +++++++++++++++++++++++++------------------------ 1 file changed, 25 insertions(+), 24 deletions(-) (limited to 'update.sh') diff --git a/update.sh b/update.sh index 90cb5203..6738950a 100755 --- a/update.sh +++ b/update.sh @@ -33,32 +33,33 @@ else do_collection=true fi +if $do_collection ; then + col=tlpkg/tlpsrc/collection-contrib.tlpsrc + echo "category Collection" > $col + echo "shortdesc tlcontrib packages" >> $col + echo "longdesc collections of all packages in contrib.texlive.info" >> $col + for i in `ls tlpkg/tlpsrc/*.tlpsrc | sort` ; do + bn=`basename $i .tlpsrc` + if [ "$bn" = "00texlive.autopatterns" -o "$bn" = "00texlive.config" -o "$bn" = 00texlive.installation \ + -o "$bn" = collection-contrib ] ; then + continue + fi + echo "depend $bn" >> $col + done -col=tlpkg/tlpsrc/collection-contrib.tlpsrc -echo "category Collection" > $col -echo "shortdesc tlcontrib packages" >> $col -echo "longdesc collections of all packages in contrib.texlive.info" >> $col -for i in `ls tlpkg/tlpsrc/*.tlpsrc | sort` ; do - bn=`basename $i .tlpsrc` - if [ "$bn" = "00texlive.autopatterns" -o "$bn" = "00texlive.config" -o "$bn" = 00texlive.installation \ - -o "$bn" = collection-contrib ] ; then - continue + git add $col + if ! git diff --cached --exit-code >/dev/null ; then + # something is staged + echo "collection contrib is updated, diff is as following:" + git diff --cached + echo "" + echo -n "Do you want to commit these changes (y/N): " + read REPLY <&2 + case $REPLY in + y*|Y*) git commit -m "collection-contrib updated" ;; + *) echo "Ok, leave it for now!" ;; + esac fi - echo "depend $bn" >> $col -done - -git add $col -if ! git diff --cached --exit-code >/dev/null ; then - # something is staged - echo "collection contrib is updated, diff is as following:" - git diff --cached - echo "" - echo -n "Do you want to commit these changes (y/N): " - read REPLY <&2 - case $REPLY in - y*|Y*) git commit -m "collection-contrib updated" ;; - *) echo "Ok, leave it for now!" ;; - esac fi if $do_tlpdb ; then -- cgit v1.2.3