3 # -----------------------------------------------------------------------------
5 # Copyright (C) 2019 AT&T Intellectual Property and Nokia
7 # Licensed under the Apache License, Version 2.0 (the "License");
8 # you may not use this file except in compliance with the License.
9 # You may obtain a copy of the License at
11 # http://www.apache.org/licenses/LICENSE-2.0
13 # Unless required by applicable law or agreed to in writing, software
14 # distributed under the License is distributed on an "AS IS" BASIS,
15 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 # See the License for the specific language governing permissions and
17 # limitations under the License.
19 # -----------------------------------------------------------------------------
22 # Abstract: Simple script which copies files that the build script left
23 # for export (packages, but could be anything). This expects
24 # that all files in /tmp/exportd are to be copied to the
25 # export directory /export The export directory is assumed to be
26 # mounted from the outside world as /export, though we will use $1
27 # as an override so this can be changed if needed.
31 # -----------------------------------------------------------------------------
33 echo "$0 starting" >&2
37 exportd=/tmp/exported # build script dumps here
41 echo "$argv0: abort: cannot find or switch to: $target" >&2
47 echo "$argv0: abort: cannot write to target directory: $target"
51 if [[ ! -d $exportd ]]
53 echo "$argv0: abort: unable to find the exported directory: $exportd" >&2
58 echo "$argv0: copy: $exportd/* --> $target" >&2
59 if ! cp -v $exportd/* $target/
64 echo "$argv0: finshed, $errors errors"