-
-
Notifications
You must be signed in to change notification settings - Fork 46
/
Copy pathinit.sh
executable file
·36 lines (30 loc) · 938 Bytes
/
init.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/usr/bin/env bash
set -euo pipefail
case "$(uname -s)" in
CYGWIN* | MINGW32* | MSYS* | MINGW*)
echo "This script is not supposed to be run on Windows. Use init-win.ps1 instead."
exit 1
;;
esac
repoRoot=$(
cd "$(dirname "$0")/.."
pwd -P
)
setupPluginLink() {
targetDir="$repoRoot/plugin-dev"
linkPath="$repoRoot/$1/Plugins/sentry"
if [[ -L "$linkPath" ]]; then
if [[ "$(readlink -f $linkPath)" == "$targetDir" ]]; then
echo "Link $linkPath already exists and matches target $targetDir - skipping"
return
fi
echo "Removing existing link $linkPath because it doesn't match the expected target"
unlink "$linkPath"
fi
mkdir -p "$(dirname "$linkPath")"
echo "Creating a link from $linkPath to $targetDir"
ln -s "$targetDir" "$linkPath"
}
setupPluginLink "sample"
"$(dirname "$0")/download-sdks.sh"
"$(dirname "$0")/download-cli.sh"