Created
November 6, 2015 13:47
-
-
Save haosdent/47529dbc1a3d01f51e2c to your computer and use it in GitHub Desktop.
upload_file.sh
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
#!/usr/bin/env bash | |
SSH_CONNECTIONS=(${SSH_CONNECTION}) | |
SERVER_HOST=${SSH_CONNECTIONS[2]} | |
SERVER_PORT=${SSH_CONNECTIONS[3]} | |
CURRENT_DIR=$(pwd) | |
echo upload_file ${SERVER_PORT} ${USER}@${SERVER_HOST}:${CURRENT_DIR} |
sudo wget -O /usr/bin/rsub https://raw.github.com/aurora/rmate/master/rmate
sudo chmod +x /usr/bin/rsub
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
sudo wget --no-check-certificate https://gist.githubusercontent.com/haosdent/47529dbc1a3d01f51e2c/raw/331b7ce50f7c7c6529975cac0613c03dfa6117cf/upload_file.sh -O /usr/bin/upload_file.sh
sudo chmod a+x /usr/bin/upload_file.sh