Skip to content

Commit 5cee3d1

Browse files
committed
Print URLs when downloading CAPI or CLI
1 parent 36dd802 commit 5cee3d1

File tree

2 files changed

+11
-12
lines changed

2 files changed

+11
-12
lines changed

install-capi.sh

+6-6
Original file line numberDiff line numberDiff line change
@@ -80,14 +80,14 @@ if [ -z "${version}" ]; then
8080
sed -n 's/[ ]*"tag_name"[ ]*:[ ]*"v\([^"]*\)"[ ]*,[ ]*$/\1/p')
8181
fi
8282

83-
base_url=https://github.com/NNPDF/pineappl/releases/download
83+
url="https://github.com/NNPDF/pineappl/releases/download/v${version}/pineappl_capi-${target}.tar.gz"
8484

85-
echo "prefix: ${prefix}"
86-
echo "target: ${target}"
87-
echo "version: ${version}"
85+
echo "prefix: '${prefix}'"
86+
echo "target: '${target}'"
87+
echo "version: '${version}'"
88+
echo "URL: '${url}'"
8889

89-
curl -s -LJ "${base_url}/v${version}/pineappl_capi-${target}.tar.gz" \
90-
| tar xzf - -C "${prefix}"
90+
curl -s -LJ "${url}" | tar xzf - -C "${prefix}"
9191

9292
# instead of `sed` and `mv` we could use `sed -i`, but on Mac it doesn't work as expected from GNU sed
9393
sed "s:prefix=/:prefix=${prefix}:" "${prefix}"/lib/pkgconfig/pineappl_capi.pc > \

install-cli.sh

+5-6
Original file line numberDiff line numberDiff line change
@@ -80,14 +80,13 @@ if [ -z "${version}" ]; then
8080
sed -n 's/[ ]*"tag_name"[ ]*:[ ]*"v\([^"]*\)"[ ]*,[ ]*$/\1/p')
8181
fi
8282

83-
base_url=https://github.com/NNPDF/pineappl/releases/download
83+
url="https://github.com/NNPDF/pineappl/releases/download/v${version}/pineappl_cli-${target}.tar.gz"
8484

85-
echo "prefix: ${prefix}"
86-
echo "target: ${target}"
87-
echo "version: ${version}"
85+
echo "prefix: '${prefix}'"
86+
echo "target: '${target}'"
87+
echo "version: '${version}'"
8888

89-
curl -s -LJ "${base_url}/v${version}/pineappl_cli-${target}.tar.gz" \
90-
| tar xzf - -C "${prefix}"
89+
curl -s -LJ "${url}" | tar xzf - -C "${prefix}"
9190

9291
if command -v pineappl >/dev/null; then
9392
path="$(command -v pineappl)"

0 commit comments

Comments
 (0)