swh:1:snp:eb70f1f85391e4b077c211bec36af0061c4bf937
Raw File
Tip revision: 76ed4584948d7c9c489d5e194e346afd0e031292 authored by Antoine R. Dumont (@ardumont) on 27 March 2017, 13:58:02 UTC
swh.storage: Use aggregate key to filter on missing skipped contents
Tip revision: 76ed458
dot_add_content
#!/bin/bash

DOT_FILE="$1"
DOT_EXTRA="$2"
if [ -z "$DOT_FILE" -o -z "$DOT_EXTRA" ] ; then
    echo "Usage: $0 DOT_FILE DOT_EXTRA"
    exit 1
fi

schema_version=$(grep -i -A 1 '^insert into dbversion' swh-schema.sql | tail -n 1 \
	      | sed -e 's/.*values(//i' -e 's/,.*//')

head -n -1 "$DOT_FILE"  # all of $DOT_FILE but last line
sed "s/@@VERSION@@/$schema_version/" "$DOT_EXTRA"
echo "}"
back to top