From e6918187568dbd01842d8d1d2c808ce16a894239 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 21 Apr 2024 13:54:28 +0200 Subject: Adding upstream version 18.2.2. Signed-off-by: Daniel Baumann --- src/test/encoding/import.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 src/test/encoding/import.sh (limited to 'src/test/encoding/import.sh') diff --git a/src/test/encoding/import.sh b/src/test/encoding/import.sh new file mode 100755 index 000000000..eea96e353 --- /dev/null +++ b/src/test/encoding/import.sh @@ -0,0 +1,23 @@ +#!/bin/sh -e + +src=$1 +ver=$2 +archive=$3 + +[ -d "$archive" ] && [ -d "$src" ] || echo "usage: $0 " + +[ -d "$archive/$ver" ] || mkdir "$archive/$ver" + +dest_dir="$archive/$ver/objects" + +[ -d "$dest_dir" ] || mkdir "$dest_dir" + +for f in `find $src -type f` +do + n=`basename $f` + type=`echo $n | sed 's/__.*//'` + md=`md5sum $f | awk '{print $1}'` + + [ -d "$dest_dir/$type" ] || mkdir $dest_dir/$type + [ -e "$dest_dir/$type/$md" ] || cp $f $dest_dir/$type/$md +done -- cgit v1.2.3