-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·46 lines (38 loc) · 1.25 KB
/
setup.sh
File metadata and controls
executable file
·46 lines (38 loc) · 1.25 KB
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
45
46
#!/usr/bin/env bash
SOURCE_DIR=$(cd $(dirname ${BASHS_SOURCE:-$0}) && pwd)
AWS_CLI_DIRECTORY=${SOURCE_DIR}/aws-cli
cd ${SOURCE_DIR}
function main(){
cp -r ${SOURCE_DIR}/analyze ${AWS_CLI_DIRECTORY}
cp ${SOURCE_DIR}/aws.sh ${AWS_CLI_DIRECTORY}
cp ${SOURCE_DIR}/bin/aws ${AWS_CLI_DIRECTORY}/bin/aws
cd ${AWS_CLI_DIRECTORY}
git branch
ls configure
if [ $? -ne 0 ] ; then
YELLOW='\033[33m'
COLOR_END='\033[0m'
echo -e "${YELLOW}Use specific version of AWS CLI. You can switch branch to the following or older versions than them.${COLOR_END}"
if [ $(uname) = 'Darwin' ] ; then
git tag -l --sort=v:refname | tail -n 10 -r
cd ${SOURCE_DIR}
. ${SOURCE_DIR}/cleanup.sh
return
fi
which tac
if [ $? -eq 0 ] ; then
git tag -l --sort=v:refname | tac | head -n 10
cd ${SOURCE_DIR}
. ${SOURCE_DIR}/cleanup.sh
return
fi
fi
rm -rf config.log config.status Makefile build output
./configure --prefix=$PWD/output --with-download-deps --with-install-type=system-sandbox
make
make install
echo "" >> .gitignore
echo output >> .gitignore
echo output.log >> .gitignore
}
main