Skip to content

Instantly share code, notes, and snippets.

@guoshuai93
Created November 25, 2020 11:13
Show Gist options
  • Save guoshuai93/6ec391a377604a05b48e3e75e5f76c1c to your computer and use it in GitHub Desktop.
Save guoshuai93/6ec391a377604a05b48e3e75e5f76c1c to your computer and use it in GitHub Desktop.
shell操作
#!/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