Created
November 25, 2020 11:13
-
-
Save guoshuai93/6ec391a377604a05b48e3e75e5f76c1c to your computer and use it in GitHub Desktop.
shell操作
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
projects=( | |
"bibox" | |
"coinpark" | |
) | |
envs=( | |
"test" | |
"sandbox" | |
) | |
echo "请选择项目 :" | |
select var_p in ${projects[@]} | |
break | |
echo "请选择环境 :" | |
select var_env in ${envs[@]} | |
break | |
echo $var_p/$var_env | |
# 复制密码 | |
echo Gs123456 | pbcopy | |
if [ $var_p = "bibox" ]; then | |
scp -r ~/dev/codes/bibox-rebuild/dist/ [email protected]:~/www/bibox/$var_env/dist/ | |
break | |
elif [ $var_p = "coinpark" ]; then | |
scp -r ~/dev/codes/coinpark/dist/ [email protected]:~/www/coinpark/$var_env/dist/ | |
break | |
else | |
echo "Try again!" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment