summaryrefslogtreecommitdiffstats
path: root/release
diff options
context:
space:
mode:
authorMartin Borg <martin.borg@enea.com>2018-12-18 18:04:34 +0100
committerMartin Borg <martin.borg@enea.com>2018-12-18 18:04:34 +0100
commit2453c039c59f2e9bbc5f3343aaceaca40558d0ee (patch)
tree47613f4fa29d20429edc8154d9cf99459336d56b /release
parent4af8ab52afa840084becd778033e16539b5afb0c (diff)
downloadel_releases-nfv-access-2453c039c59f2e9bbc5f3343aaceaca40558d0ee.tar.gz
copyrc.sh: Search for artifacts using 'find'
Change-Id: I1731b7b69aac9d10fc14122c3b1e6f18696d3d22 Signed-off-by: Martin Borg <martin.borg@enea.com>
Diffstat (limited to 'release')
-rw-r--r--release/RELEASE_CONTENT10
-rwxr-xr-xrelease/copyrc.sh29
2 files changed, 22 insertions, 17 deletions
diff --git a/release/RELEASE_CONTENT b/release/RELEASE_CONTENT
index 3fb3799..161c599 100644
--- a/release/RELEASE_CONTENT
+++ b/release/RELEASE_CONTENT
@@ -1,11 +1,13 @@
1# The release structure is defined here as: 1# The release structure is defined here as:
2# <path to artifact within build folder>:<destination path in release structure> 2# <artifact name>:<destination path in release structure>
3 3
4# atom-c3000 images 4# atom-c3000 images
5tmp/deploy/images/atom-c3000/enea-nfv-access-edgelink-netconf-atom-c3000.hddimg:atom-c3000/enea-nfv-access-edgelink-netconf-atom-c3000.hddimg 5enea-nfv-access-edgelink-netconf-atom-c3000.hddimg:atom-c3000/enea-nfv-access-edgelink-netconf-atom-c3000.hddimg
6 6
7# xeon-d images 7# xeon-d images
8tmp/deploy/images/xeon-d/enea-nfv-access-edgelink-netconf-xeon-d.hddimg:xeon-d/enea-nfv-access-edgelink-netconf-xeon-d.hddimg 8enea-nfv-access-edgelink-netconf-xeon-d.hddimg:xeon-d/enea-nfv-access-edgelink-netconf-xeon-d.hddimg
9 9
10# documentation 10# documentation
11doc/book-enea-nfv-access-guide-intel/book-enea-nfv-access-guide-intel.pdf:Documentation/book-enea-nfv-access-guide-intel.pdf 11book-enea-nfv-access-getting-started.pdf:Documentation/book-enea-nfv-access-getting-started.pdf
12book-enea-nfv-access-reference-guide-intel.pdf:Documentation/book-enea-nfv-access-reference-guide-intel.pdf
13
diff --git a/release/copyrc.sh b/release/copyrc.sh
index 7e9616d..8c21838 100755
--- a/release/copyrc.sh
+++ b/release/copyrc.sh
@@ -10,6 +10,7 @@ Usage:
10 $(basename $0) [OPTIONS] -o <output directory> <build directory>... 10 $(basename $0) [OPTIONS] -o <output directory> <build directory>...
11 11
12OPTIONS: 12OPTIONS:
13 -i Ignore missing files
13 -p Print the release structure without creating it 14 -p Print the release structure without creating it
14 -r <file> Set release definition file (default: RELEASE_CONTENT) 15 -r <file> Set release definition file (default: RELEASE_CONTENT)
15 16
@@ -19,8 +20,9 @@ EOF
19 20
20RC_def="./RELEASE_CONTENT" 21RC_def="./RELEASE_CONTENT"
21 22
22while getopts "o:pr:" name; do 23while getopts "io:pr:" name; do
23 case $name in 24 case $name in
25 i) ignore_missing=1 ;;
24 o) RC_dir=$OPTARG ;; 26 o) RC_dir=$OPTARG ;;
25 r) RC_def=$OPTARG ;; 27 r) RC_def=$OPTARG ;;
26 p) print=1 ;; 28 p) print=1 ;;
@@ -59,19 +61,20 @@ while read line; do
59 continue 61 continue
60 fi 62 fi
61 63
62 found=0 64 srcpath=$(find -L ${builddirs[@]} -wholename "*$srcfile" -print -quit)
63 for srcdir in ${builddirs[@]}; do 65
64 if [ -f "$srcdir/$srcfile" ]; then 66 if [ "$srcpath" ]; then
65 found=1
66 mkdir -p "$RC_dir/$(dirname "$dstfile")"
67 cp -Lpv $srcdir/$srcfile $RC_dir/$dstfile
68 break
69 fi
70 done
71 67
72 if [ "$found" -eq "0" ]; then 68 mkdir -p "$RC_dir/$(dirname "$dstfile")"
73 echo "ERROR: File '$srcfile' not found" 69 cp -Lpvr $srcpath $RC_dir/$dstfile
74 exit 1 70
71 else
72 if [ "$ignore_missing" ]; then
73 echo "WARNING: File '$srcfile' not found"
74 else
75 echo "ERROR: File '$srcfile' not found"
76 exit 1
77 fi
75 fi 78 fi
76 79
77done < $RC_def 80done < $RC_def