mirror of
https://gitee.com/jiulinxiri/ssh-scp-deploy.git
synced 2025-09-10 02:15:25 +08:00
17 lines
336 B
Bash
Executable File
17 lines
336 B
Bash
Executable File
#!/bin/sh
|
|
|
|
PASSWORD=${INPUT_PASSWORD};
|
|
KEY=${INPUT_KEY};
|
|
|
|
if [ -z "$KEY" ] && [ -z "$PASSWORD" ]; then
|
|
echo "🔑 Please provide at least a key or a password...";
|
|
exit 0;
|
|
fi
|
|
|
|
if [[ -n "$KEY" ]]; then
|
|
echo "🔑 Using key file...";
|
|
source /with_key.sh;
|
|
else
|
|
echo "🔑 Using password...";
|
|
source /with_pass.sh;
|
|
fi |