File tree Expand file tree Collapse file tree 2 files changed +16
-9
lines changed Expand file tree Collapse file tree 2 files changed +16
-9
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
- set -ex
3
+ set -eux
4
4
5
5
SOURCE_PATH=" $( cd " $( dirname " $0 " ) /../../../" && pwd ) "
6
6
7
7
cd " $SOURCE_PATH "
8
8
9
9
WASI_SDK_URL=" https://github.com/swiftwasm/wasi-sdk/releases/download/0.2.2-swiftwasm/dist-$2 .zip"
10
10
11
- [ ! -e dist-wasi-sdk.zip ] && \
12
- wget -O dist-wasi-sdk.zip " $WASI_SDK_URL "
11
+ workdir=$( mktemp -d)
12
+ pushd $workdir
13
+
14
+ wget -O dist-wasi-sdk.zip " $WASI_SDK_URL "
13
15
unzip -u dist-wasi-sdk.zip -d .
14
- WASI_SDK_TAR_PATH=$( find . -type f -name " wasi-sdk-*" )
16
+
17
+ WASI_SDK_TAR_PATH=$( find " $workdir " -type f -name " wasi-sdk-*" )
15
18
WASI_SDK_FULL_NAME=$( basename " $WASI_SDK_TAR_PATH " -" $1 " .tar.gz)
16
19
tar xfz " $WASI_SDK_TAR_PATH "
17
- rm -rf ./wasi-sdk
18
- mv " $WASI_SDK_FULL_NAME " ./wasi-sdk
20
+ popd
21
+
22
+ rm -rf $SOURCE_PATH /wasi-sdk
23
+ mv " $workdir /$WASI_SDK_FULL_NAME " $SOURCE_PATH /wasi-sdk
Original file line number Diff line number Diff line change 2
2
3
3
set -ex
4
4
5
- brew uninstall $( brew list | grep python@2)
6
- brew install cmake ninja llvm sccache wasmer
5
+ if [[ ! -z " $CI " ]]; then
6
+ brew uninstall $( brew list | grep python@2)
7
+ brew install cmake ninja llvm sccache wasmer
8
+ fi
7
9
8
- SOURCE_PATH=" $( cd " $( dirname $0 ) /../../../../" && pwd ) "
10
+ SOURCE_PATH=" $( cd " $( dirname $0 ) /../../../../" && pwd) "
9
11
SWIFT_PATH=$SOURCE_PATH /swift
10
12
cd $SWIFT_PATH
11
13
You can’t perform that action at this time.
0 commit comments