From 6bf0a5cb5034a7e684dcc3500e841785237ce2dd Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 19:32:43 +0200 Subject: Adding upstream version 1:115.7.0. Signed-off-by: Daniel Baumann --- .../formautofill/test/browser/fathom/test-setup.sh | 39 ++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100755 browser/extensions/formautofill/test/browser/fathom/test-setup.sh (limited to 'browser/extensions/formautofill/test/browser/fathom/test-setup.sh') 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 -- cgit v1.2.3