From fd0f3d44f31092cc5db4ced30218836f28db263e Mon Sep 17 00:00:00 2001 From: Martin Borg Date: Wed, 7 Aug 2019 09:48:31 +0200 Subject: copyrc.sh: create md5 checksum for each file included in the release Change-Id: Ia55c3443fb5c3ce55683179ca512e7f8b389d077 Signed-off-by: Martin Borg --- release/copyrc.sh | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/release/copyrc.sh b/release/copyrc.sh index 8c21838..f2a56cb 100755 --- a/release/copyrc.sh +++ b/release/copyrc.sh @@ -54,20 +54,24 @@ builddirs=("$@") while read line; do if [ -z "$line" ] || [[ $line = \#* ]]; then continue; fi - IFS=: read -r srcfile dstfile _ <<< $line + IFS=: read -r srcfile dstpath _ <<< $line if [ ! -z "$print" ]; then - echo $RC_dir/$dstfile + echo $RC_dir/$dstpath continue fi srcpath=$(find -L ${builddirs[@]} -wholename "*$srcfile" -print -quit) if [ "$srcpath" ]; then - - mkdir -p "$RC_dir/$(dirname "$dstfile")" - cp -Lpvr $srcpath $RC_dir/$dstfile - + dstdir=$RC_dir/$(dirname "$dstpath") + dstfile=$(basename "$dstpath") + + mkdir -p $dstdir + cp -Lpv $srcpath $dstdir/$dstfile + pushd $dstdir + md5sum $dstfile > $dstfile.md5 + popd else if [ "$ignore_missing" ]; then echo "WARNING: File '$srcfile' not found" -- cgit v1.2.3-54-g00ecf