summaryrefslogtreecommitdiff
path: root/update.sh
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2017-09-04 09:52:44 +0900
committerNorbert Preining <norbert@preining.info>2017-09-04 09:52:44 +0900
commit21288bd5c5710dfe7f3edf25195fb050b4790150 (patch)
tree3fc1f7da8fcca93565b580e1f2b0cded80079c41 /update.sh
parentfb2ae85fb27e83efda06601e1752816479fc54fd (diff)
update.sh: actual accept do_collection
Diffstat (limited to 'update.sh')
-rwxr-xr-xupdate.sh49
1 files changed, 25 insertions, 24 deletions
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