
3 changed files with 49 additions and 49 deletions
@ -1,44 +0,0 @@
|
||||
#!/bin/bash |
||||
# |
||||
# This file is part of GetTor, a Tor Browser distribution system. |
||||
# |
||||
# :authors: hiro <hiro@torproject.org> |
||||
# cecylia <cohosh@torproject.org> |
||||
# see also AUTHORS file |
||||
# |
||||
# :copyright: (c) 2008-2019, The Tor Project, Inc. |
||||
# |
||||
# :license: This is Free Software. See LICENSE for license information. |
||||
# |
||||
# Updates tor browser binaries at Google Drive and Internet Archive |
||||
# |
||||
|
||||
cd ~/releases |
||||
rclone delete gdrive:releases |
||||
rclone cleanup gdrive:releases |
||||
|
||||
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 |
||||
|
||||
f=${r##*/} |
||||
|
||||
# Update Google Drive |
||||
rclone copy $f gdrive:releases |
||||
|
||||
# Update Internet Archive |
||||
ia upload ${f} $f --remote-name=$f --metadata="title:${f}" --metadata="mediatype:software" --metadata="collection:open_source_software" |
||||
|
||||
rm $f |
||||
|
||||
fi; |
||||
done |
||||
|
Loading…
Reference in new issue