blob: 1517b5e689a923a20c1bc53da5b2c2ca0f0598c8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
#!/bin/sh
# This script is meant to preserve and restore CI artifacts so they can be passed from job to job.
# See arti!786 for why it is done this way, and what could be done better.
set -eu
PREFIX="artifacts"
if [ "$1" = "-u" ]; then
mv "$PREFIX/"* .
exit 0
else
for path in "$@"
do
DIR=$(dirname "$path")
mkdir -p "$PREFIX/$DIR"
cp -al "$path" "$PREFIX/$path"
done
fi
|