tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

update-archive-timestamp.sh (735B)


      1 #!/bin/bash
      2 # Copyright 2018 The Chromium Authors
      3 # Use of this source code is governed by a BSD-style license that can be
      4 # found in the LICENSE file.
      5 
      6 # This script updates sysroot_creator.py with the timestamp of the latest
      7 # snapshot from snapshot.debian.org.
      8 
      9 SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
     10 ARCHIVE_URL="http://snapshot.debian.org/archive/debian"
     11 
     12 # Use 9999-01-01 as the date so that we get a redirect to the page with the
     13 # latest timestamp.
     14 TIMESTAMP=$(curl -s "${ARCHIVE_URL}/99990101T000000Z/pool/" | \
     15  sed -n "s|.*/archive/debian/\([[:digit:]TZ]\+\)/pool/.*|\1|p" | head -n 1)
     16 
     17 sed -i "s/ARCHIVE_TIMESTAMP = .*$/ARCHIVE_TIMESTAMP = \"${TIMESTAMP}\"/" \
     18  "${SCRIPT_DIR}"/sysroot_creator.py