diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 17:32:43 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 17:32:43 +0000 |
commit | 6bf0a5cb5034a7e684dcc3500e841785237ce2dd (patch) | |
tree | a68f146d7fa01f0134297619fbe7e33db084e0aa /browser/extensions/formautofill/test/browser/fathom/test-setup.sh | |
parent | Initial commit. (diff) | |
download | thunderbird-upstream.tar.xz thunderbird-upstream.zip |
Adding upstream version 1:115.7.0.upstream/1%115.7.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'browser/extensions/formautofill/test/browser/fathom/test-setup.sh')
-rwxr-xr-x | browser/extensions/formautofill/test/browser/fathom/test-setup.sh | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/browser/extensions/formautofill/test/browser/fathom/test-setup.sh b/browser/extensions/formautofill/test/browser/fathom/test-setup.sh new file mode 100755 index 0000000000..1547c4a395 --- /dev/null +++ b/browser/extensions/formautofill/test/browser/fathom/test-setup.sh @@ -0,0 +1,39 @@ +#!/bin/sh +# This script download samples for testing + +clean=1 +cleanall=0 +sample_dir=autofill-repo-samples + +while [ $# -gt 0 ]; do + case "$1" in + -c) clean=1 ;; + -cc) cleanall=1 ;; + esac + shift +done + +# Check out source code +if ! [ -d "fathom-form-autofill" ]; then + echo "Get samples from repo..." + git clone https://github.com/mozilla-services/fathom-form-autofill +fi + +if ! [ -d "samples" ]; then + echo "Copy samples..." + mkdir $sample_dir + cp -r fathom-form-autofill/samples/testing $sample_dir + cp -r fathom-form-autofill/samples/training $sample_dir + cp -r fathom-form-autofill/samples/validation $sample_dir +else + echo "\`samples\` directory already exists" +fi + +if [ "$clean" = 1 ] || [ "$cleanall" = 1 ]; then + echo "Cleanup..." + rm -rf fathom-form-autofill +fi + +if [ "$cleanall" = 1 ]; then + rm -rf $sample_dir +fi |