Remove old workaround for lack of pipefail
Signed-off-by: Evan Lloyd New-Schmidt <evan@new-schmidt.com>
This commit is contained in:
parent
b06167f9d9
commit
38faebbc54
1 changed files with 3 additions and 6 deletions
|
@ -54,15 +54,12 @@ fi
|
|||
# shellcheck disable=SC2086 # LANGUAGES is intentionally expanded.
|
||||
log "Selected languages:" $LANGUAGES
|
||||
|
||||
TMP_DIR=$(mktemp --tmpdir -d wikiparser-download-XXXX)
|
||||
trap 'rm -rf $TMP_DIR' EXIT INT HUP
|
||||
|
||||
log "Fetching run index"
|
||||
# Call wget outside of pipeline for errors to be caught by set -e.
|
||||
wget 'https://dumps.wikimedia.org/other/enterprise_html/runs/' --no-verbose -O "$TMP_DIR/runs.html"
|
||||
|
||||
|
||||
# The date of the latest dump, YYYYMMDD.
|
||||
LATEST_DUMP=$(grep -Po '(?<=href=")[^"]*' "$TMP_DIR/runs.html" | grep -P '\d{8}' | sort -r | head -n1)
|
||||
LATEST_DUMP=$(wget 'https://dumps.wikimedia.org/other/enterprise_html/runs/' --no-verbose -O - \
|
||||
| grep -Po '(?<=href=")[^"]*' | grep -P '\d{8}' | sort -r | head -n1)
|
||||
LATEST_DUMP="${LATEST_DUMP%/}"
|
||||
|
||||
log "Checking latest dump $LATEST_DUMP"
|
||||
|
|
Loading…
Add table
Reference in a new issue