|
#!/bin/bash |
|
source scripts/utils.sh echo -n |
|
|
|
|
|
set -o errexit -o pipefail |
|
|
|
|
|
|
|
|
|
files_url=( |
|
"https://bigearth.net/downloads/BigEarthNet-S2-v1.0.tar.gz S2/BigEarthNet-S2-v1.0.tar.gz" |
|
"https://bigearth.net/static/documents/Description_BigEarthNet-S2.pdf S2/Description_BigEarthNet-S2.pdf" |
|
"https://bigearth.net/static/documents/patches_with_seasonal_snow.csv S2/patches_with_seasonal_snow.csv" |
|
"https://bigearth.net/static/documents/patches_with_cloud_and_shadow.csv S2/patches_with_cloud_and_shadow.csv" |
|
"https://bigearth.net/downloads/BigEarthNet-S1-v1.0.tar.gz S1/BigEarthNet-S1-v1.0.tar.gz" |
|
"https://bigearth.net/static/documents/Description_BigEarthNet-S1.pdf S1/Description_BigEarthNet-S1.pdf" |
|
"https://bigearth.net/static/documents/Description_BigEarthNet-MM.pdf MM/Description_BigEarthNet-MM.pdf") |
|
|
|
git-annex addurl --fast -c annex.largefiles=anything --raw --batch --with-files <<EOF |
|
$(for file_url in "${files_url[@]}" ; do echo "${file_url}" ; done) |
|
EOF |
|
|
|
|
|
|
|
! git-annex get --fast -J8 |
|
|
|
|
|
ls -l $(list) | grep -oE "\.git/[^']*" | \ |
|
cut -d'/' -f7 | xargs -n1 -- find .git/annex/tmp/ -name | \ |
|
while read f |
|
do |
|
newfsize=$(($(stat -c '%s' "${f}") - 1)) |
|
truncate -s $newfsize "${f}" |
|
done |
|
|
|
git-annex get --fast --incomplete |
|
git-annex migrate --fast -c annex.largefiles=anything * |
|
|
|
|
|
if [[ -f md5sums ]] |
|
then |
|
md5sum -c md5sums |
|
fi |
|
list -- --fast | while read f |
|
do |
|
if [[ -z "$(echo "${f}" | grep -E "^bin/")" ]] && |
|
[[ -z "$(grep -E " (\./)?${f//\./\\.}$" md5sums)" ]] |
|
then |
|
md5sum "${f}" >> md5sums |
|
fi |
|
done |
|
|