[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [gettor/master] Add script to fetch and update tor browser releases to gitlab and github
commit bf233f90d476f2da182687418ef69cebd8b46a87
Author: hiro <hiro@xxxxxxxxxxxxxx>
Date: Mon Aug 26 20:05:51 2019 +0200
Add script to fetch and update tor browser releases to gitlab and github
---
scripts/update_files | 47 +++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 47 insertions(+)
diff --git a/scripts/update_files b/scripts/update_files
new file mode 100644
index 0000000..ee9790b
--- /dev/null
+++ b/scripts/update_files
@@ -0,0 +1,47 @@
+#!/bin/bash
+#
+# This file is part of GetTor, a Tor Browser distribution system.
+#
+# :authors: hiro <hiro@xxxxxxxxxxxxxx>
+# see also AUTHORS file
+#
+# :copyright: (c) 2008-2019, The Tor Project, Inc.
+#
+# :license: This is Free Software. See LICENSE for license information.
+
+cd ~/releases
+git checkout -B releases
+rm -f torbrowser-* TorBrowser-* tor-browser-*
+
+for row in $(
+ curl -s 'https://aus1.torproject.org/torbrowser/update_3/release/downloads.json' |
+ jq -r '.downloads'
+ ); do
+ r=$(
+ echo ${row} |
+ egrep -o 'https?://[^ ]+' |
+ tr -d '",'
+ );
+ if [[ $r = *[!\ ]* ]]; then
+ wget $r
+ fi;
+done
+
+git add .
+git commit -m '[dist ci] commit from CI runner - update with new torbrowser downloads'
+diffs=$(git diff origin/releases)
+if [ -z "$diffs" ]; then
+ echo "No new releases"
+else
+ git push -f --follow-tags origin releases
+fi
+
+git fetch --all
+git checkout -b torbrowser-releases
+
+diffs=$(git diff github/torbrowser-releases)
+if [ -z "$diffs" ]; then
+ echo "No new releases"
+else
+ git push -f --follow-tags github torbrowser-releases
+fi
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits