kopia lustrzana https://github.com/piku/piku
Proxy scp for piku user, add 'download' local cmd.
rodzic
c5a105f676
commit
5c33e28b94
5
piku
5
piku
|
@ -52,6 +52,8 @@ else
|
|||
ssh -o LogLevel=QUIET ${sshflags} "$server" "$@" | grep -v "INTERNAL"
|
||||
echo " shell Local command to start an SSH session in the remote."
|
||||
echo " init Local command to download an example ENV and Procfile."
|
||||
echo " download Local command to scp down a remote file. args: REMOTE-FILE(s) LOCAL-PATH"
|
||||
echo " Remote file path is relative to the app folder."
|
||||
;;
|
||||
apps|setup|setup:ssh|update)
|
||||
ssh ${sshflags} "$server" "$@"
|
||||
|
@ -59,6 +61,9 @@ else
|
|||
shell)
|
||||
ssh -t "$server" run "$app" bash
|
||||
;;
|
||||
download)
|
||||
scp "$server:~/.piku/apps/${app}/${2}" ${3:-'.'}
|
||||
;;
|
||||
*)
|
||||
shift # remove cmd arg
|
||||
ssh ${sshflags} "$server" "$cmd" "$app" "$@"
|
||||
|
|
7
piku.py
7
piku.py
|
@ -1649,6 +1649,13 @@ def cmd_git_upload_pack(app):
|
|||
call('git-shell -c "{}" '.format(argv[1] + " '{}'".format(app)), cwd=GIT_ROOT, shell=True)
|
||||
|
||||
|
||||
@piku.command("scp", context_settings=dict(ignore_unknown_options=True, allow_extra_args=True))
|
||||
@pass_context
|
||||
def cmd_scp(ctx):
|
||||
"""Simple wrapper to allow scp to work."""
|
||||
call(" ".join(["scp"] + ctx.args), cwd=GIT_ROOT, shell=True)
|
||||
|
||||
|
||||
def _get_plugin_commands(path):
|
||||
sys_path.append(abspath(path))
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue