summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Borg <martin.borg@enea.com>2019-08-07 09:48:31 +0200
committerAdrian Dudau <Adrian.Dudau@enea.com>2019-08-09 09:34:24 +0200
commitfd0f3d44f31092cc5db4ced30218836f28db263e (patch)
tree82521102715ffe4dbeae1351de434a9543839ca9
parent364b0fa25d272162b8a344ad8feb366a94d24122 (diff)
downloadel_releases-nfv-access-fd0f3d44f31092cc5db4ced30218836f28db263e.tar.gz
copyrc.sh: create md5 checksum for each file included in the release
Change-Id: Ia55c3443fb5c3ce55683179ca512e7f8b389d077 Signed-off-by: Martin Borg <martin.borg@enea.com>
-rwxr-xr-xrelease/copyrc.sh16
1 files 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=("$@")
54while read line; do 54while read line; do
55 if [ -z "$line" ] || [[ $line = \#* ]]; then continue; fi 55 if [ -z "$line" ] || [[ $line = \#* ]]; then continue; fi
56 56
57 IFS=: read -r srcfile dstfile _ <<< $line 57 IFS=: read -r srcfile dstpath _ <<< $line
58 58
59 if [ ! -z "$print" ]; then 59 if [ ! -z "$print" ]; then
60 echo $RC_dir/$dstfile 60 echo $RC_dir/$dstpath
61 continue 61 continue
62 fi 62 fi
63 63
64 srcpath=$(find -L ${builddirs[@]} -wholename "*$srcfile" -print -quit) 64 srcpath=$(find -L ${builddirs[@]} -wholename "*$srcfile" -print -quit)
65 65
66 if [ "$srcpath" ]; then 66 if [ "$srcpath" ]; then
67 67 dstdir=$RC_dir/$(dirname "$dstpath")
68 mkdir -p "$RC_dir/$(dirname "$dstfile")" 68 dstfile=$(basename "$dstpath")
69 cp -Lpvr $srcpath $RC_dir/$dstfile 69
70 70 mkdir -p $dstdir
71 cp -Lpv $srcpath $dstdir/$dstfile
72 pushd $dstdir
73 md5sum $dstfile > $dstfile.md5
74 popd
71 else 75 else
72 if [ "$ignore_missing" ]; then 76 if [ "$ignore_missing" ]; then
73 echo "WARNING: File '$srcfile' not found" 77 echo "WARNING: File '$srcfile' not found"