Datasets:
Delete install_aws_cli.sh
Browse files- install_aws_cli.sh +0 -28
install_aws_cli.sh
DELETED
|
@@ -1,28 +0,0 @@
|
|
| 1 |
-
#!/bin/bash
|
| 2 |
-
|
| 3 |
-
# 创建必要的目录
|
| 4 |
-
mkdir -p ~/bin
|
| 5 |
-
mkdir -p ~/aws-cli
|
| 6 |
-
|
| 7 |
-
# 下载 AWS CLI
|
| 8 |
-
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
|
| 9 |
-
|
| 10 |
-
# 解压文件
|
| 11 |
-
python -m zipfile -e awscliv2.zip .
|
| 12 |
-
|
| 13 |
-
# 安装 AWS CLI
|
| 14 |
-
./aws/install --bin-dir ~/bin --install-dir ~/aws-cli
|
| 15 |
-
|
| 16 |
-
# 配置环境变量
|
| 17 |
-
if ! grep -q "export PATH=~/bin:\$PATH" ~/.bashrc; then
|
| 18 |
-
echo 'export PATH=~/bin:$PATH' >> ~/.bashrc
|
| 19 |
-
fi
|
| 20 |
-
|
| 21 |
-
if [ -f ~/.zshrc ]; then
|
| 22 |
-
if ! grep -q "export PATH=~/bin:\$PATH" ~/.zshrc; then
|
| 23 |
-
echo 'export PATH=~/bin:$PATH' >> ~/.zshrc
|
| 24 |
-
fi
|
| 25 |
-
fi
|
| 26 |
-
|
| 27 |
-
# 清理临时文件
|
| 28 |
-
rm -rf awscliv2.zip aws
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|