Get new script

This commit is contained in:
Filip Gralinski 2022-02-22 17:32:16 +01:00
parent ef8b8bd6d9
commit 96cda9951d
2 changed files with 26 additions and 11 deletions

View File

@ -1,11 +0,0 @@
#!/bin/bash
git annex init
for file in images/*.png
do
url=https://re-research.pl/git-annex-storage/fiszki-ocr/$file
echo $url $file
done | git annex addurl --batch --with-files
git annex get images/*.png

26
get-annexed-files.sh Executable file
View File

@ -0,0 +1,26 @@
#!/bin/sh -e
if ! command -v git-annex > /dev/null
then
echo >&2 "git-annex not available, you need to install it"
exit 1
fi
# Just in case the repo was cloned with --single-branch option
git config remote.origin.fetch refs/heads/*:refs/remotes/origin/*
git annex init
git annex sync -a --no-push
if ! git annex enableremote gonito-https
then
echo >&2 "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
echo >&2 "Setting httpalso failed, likely because you have an outdated version of git-annex"
echo >&2 "See https://git-annex.branchable.com/install/"
echo >&2 "Probably the easiest way is to use conda: conda install -c conda-forge git-annex"
echo >&2 "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
exit 1
fi
git annex get $@ --from gonito-https