mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-28 15:52:49 +01:00
upload.sh: Add option ssh_identity
Add config option ssh_identity TODO: this obsoletes scp_pw and rsync_ssh_pw, remove them
This commit is contained in:
parent
2c8a0b582d
commit
1a1fabeafd
1 changed files with 9 additions and 1 deletions
|
|
@ -43,9 +43,14 @@ file_mode=
|
||||||
dir_mode=
|
dir_mode=
|
||||||
file_owner=
|
file_owner=
|
||||||
file_group=
|
file_group=
|
||||||
|
ssh_identity=
|
||||||
|
|
||||||
test -f $CFG_FILE && . $CFG_FILE
|
test -f $CFG_FILE && . $CFG_FILE
|
||||||
|
|
||||||
|
if [ -n "$ssh_identity" ]; then
|
||||||
|
CFG_IDENTITY="-i $ssh_identity"
|
||||||
|
fi
|
||||||
|
|
||||||
usage()
|
usage()
|
||||||
{
|
{
|
||||||
cat << EOT
|
cat << EOT
|
||||||
|
|
@ -86,6 +91,7 @@ cat << EOT
|
||||||
dir_mode="$dir_mode"
|
dir_mode="$dir_mode"
|
||||||
file_owner="$file_owner"
|
file_owner="$file_owner"
|
||||||
file_group="$file_group"
|
file_group="$file_group"
|
||||||
|
ssh_identity="$ssh_identity"
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
|
|
||||||
|
|
@ -117,7 +123,9 @@ parse_target()
|
||||||
if [ -n "$PASSWD" ]; then
|
if [ -n "$PASSWD" ]; then
|
||||||
echo passwd="\"$PASSWD\";"
|
echo passwd="\"$PASSWD\";"
|
||||||
if [ -f "$PASSWD" ]; then
|
if [ -f "$PASSWD" ]; then
|
||||||
echo IDENTITY="\"-i $PASSWD\""
|
echo IDENTITY="\"-i $PASSWD\";"
|
||||||
|
else
|
||||||
|
echo IDENTITY="\"$CFG_IDENTITY\";"
|
||||||
fi
|
fi
|
||||||
echo pw_ftp="\"$PASSWD\";"
|
echo pw_ftp="\"$PASSWD\";"
|
||||||
echo pw_scp="\"$PASSWD\";"
|
echo pw_scp="\"$PASSWD\";"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue