Skip to content
This repository has been archived by the owner on Apr 18, 2024. It is now read-only.

Commit

Permalink
chore: fix download-webui script
Browse files Browse the repository at this point in the history
- Make the file executable
- Run `mkdir -p` to ensure the target directory exists
- Fix the output directory resolve the path against the script file,
  not against the current working directory.

Signed-off-by: Miroslav Bajtoš <[email protected]>
  • Loading branch information
bajtos committed Jun 20, 2022
1 parent 5f6d631 commit c43d2b4
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion scripts/download-webui.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
#!/usr/bin/env bash

OUTDIR=$(dirname $0)/../resources/webui/

echo "⇣ Downloading webui dist to $OUTDIR"

mkdir -p $OUTDIR

# Downloads latest release
url=$(curl -s https://api.github.com/repos/filecoin-project/saturn-l2-webui/releases/latest | \
jq -r '.assets[] | select(.name|match("saturn-l2-webui.tar.gz$")) | .browser_download_url')

curl -L $url | tar -zx -C ../resources/webui/
curl -L $url | tar -zx -C $OUTDIR

0 comments on commit c43d2b4

Please sign in to comment.