diff --git a/libexec/git-lfs-wget b/libexec/git-lfs-wget new file mode 100755 index 0000000000..84646d2f91 --- /dev/null +++ b/libexec/git-lfs-wget @@ -0,0 +1,24 @@ +#!/bin/bash + +[ "$#" -ne 2 ] && echo 'Usage: git-lfs-wget URI subpath' && exit 1 + +subdir=$(echo $1 | awk -F/ '{print$NF}' | awk -F. '{print$1}') + +if [ -d $subdir ] +then + if ! [ -e $subdir/.git ] + then + echo "ERROR: $subdir already exists but is not a git repo." + exit 1 + fi +else + GIT_LFS_SKIP_SMUDGE=1 git clone $1 + git lfs install --skip-smudge +fi + +cd $subdir + +git config lfs.fetchinclude "$2" + +git lfs pull + diff --git a/libexec/gold-diff b/libexec/gold-diff new file mode 100755 index 0000000000..8e2903ae0a --- /dev/null +++ b/libexec/gold-diff @@ -0,0 +1,16 @@ +#!/bin/bash + +[ "$#" -ne 2 ] && echo 'Usage: gold-diff dir1 dir2' && exit 1 + +a=$1 +b=$2 + +for x in $a/*.hipo +do + y=$b/$(basename $x) + stub=$(basename $x) + stub=${stub%%.*} + hipo-diff -q 1 -s 0,1,2 -n 10000 $x $y >& $stub.log & +done + +wait diff --git a/libexec/gold-run b/libexec/gold-run new file mode 100755 index 0000000000..9a1fe66339 --- /dev/null +++ b/libexec/gold-run @@ -0,0 +1,27 @@ +#!/bin/bash + +exe='decoder4u -n 10000' +csv=gold.csv +cache=pin-gold.txt + +if ! [ -f $csv ] || ! [ -f $cache ] +then + echo "ERROR: This requires the gold text files from the 'raw-data' repository" + echo "to be in your current working directory. The easiest way to get them:" + echo "GIT_LFS_SKIP_SMUDGE=1 git clone https://code.jlab.org/hallb/clas12/raw-data.git" + exit 1 +fi + +IFS=$'\n' + +for x in $(tail -n +2 $csv) +do + x=${x//[[:space:]]/} + run=${x##*,} + period=${x%%,*} + stub=${period}_${run} + data=$(grep ${run} $cache | grep 1$) + $exe -o $stub.hipo $data >& $stub.log & +done + +wait