-
Notifications
You must be signed in to change notification settings - Fork 7
/
install.sh
executable file
·44 lines (37 loc) · 1.04 KB
/
install.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
37
38
39
40
41
42
43
44
#!/usr/bin/env bash
# check prerequisites: AWS
AWS_CHECK=$(aws sts get-caller-identity > /dev/null ;echo $?)
if [ $AWS_CHECK -eq 0 ];
then
echo "AWS access confirmed."
else
echo "No AWS access. Install and set up access as instructed here: https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html"
exit 1;
fi
# check prerequisites: NVM
if [ -d "$NVM_DIR/.git" ];
then
echo "nvm installed";
else
echo "nvm not installed. Install it as instructed here: https://github.com/nvm-sh/nvm#install--update-script";
exit 1;
fi
# cleanup of previous runs
rm -rf ./node_modules
rm -rf aws-sleek-transformer*gz
# install dependencies
HELM_VERSION="v3.8.1"
curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3
chmod +x get_helm.sh
./get_helm.sh -v $HELM_VERSION
rm -rf get_helm.sh
. $NVM_DIR/nvm.sh
nvm install
npm install
# pack
npm run prepack
npm pack
#install
PCK=$(ls aws-sleek-transformer*gz)
npm install -g $PCK
echo "Installed successfully, test by running: 'aws-sleek-transformer' --help "