diff options
| author | Czarek Nakamoto <cyjan@mrcyjanek.net> | 2023-12-31 00:05:42 +0100 |
|---|---|---|
| committer | Czarek Nakamoto <cyjan@mrcyjanek.net> | 2023-12-31 00:05:42 +0100 |
| commit | dab29fefff3b2623e6b1f9f16d27cb1e385423c1 (patch) | |
| tree | bc7c3707e23f344a8c0b610eab80902c1ad3fc06 /download_artifact.sh | |
| parent | 5b25551b7f347e19266e4bc19983bf50d01f73d9 (diff) | |
CI: don't push downloaded cache
Diffstat (limited to 'download_artifact.sh')
| -rwxr-xr-x | download_artifact.sh | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/download_artifact.sh b/download_artifact.sh index 4a270a1..55d6a17 100755 --- a/download_artifact.sh +++ b/download_artifact.sh @@ -8,7 +8,7 @@ path_to_file="$3.xz" basename="$(basename $path_to_file)" curl "https://git.mrcyjanek.net/api/packages/mrcyjanek/generic/monero_c/${cache_name}-${cache_key}/${basename}" > /tmp/cache -if [[ "xpackage does not exist" == "x$(head -1 /tmp/cache)" ]]; +if [[ "xpackage does not exist" == "x$(head -1 /tmp/cache 2>/dev/null)" ]]; then echo "Cache miss '$1' '$2' '$basename'" rm /tmp/cache @@ -20,4 +20,9 @@ fi mkdir -p $path_to_file rm -rf $path_to_file mv /tmp/cache $path_to_file -unxz $path_to_file || rm $path_to_file
\ No newline at end of file +unxz $path_to_file || rm $path_to_file + +if [[ -f "$3" ]]; +then + touch /tmp/cache_hit_$(echo "$3" | md5sum) +fi
\ No newline at end of file |
