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
| function servername_push() | |
| { | |
| if [[ ( $# -eq 0 ) || ( $1 == "--help" ) || ( $1 == "-h" ) ]] ; then | |
| echo "Usage: servername_push PATH_FROM PATH TO." | |
| echo "Purpose: rsync function to push files to servername." | |
| echo " " | |
| echo "Mandatory arguments: " | |
| echo "PATH_FROM: Path on local to Rsync from" | |
| echo "PATH_TO: Path on server to Rsync to" | |
| echo " " |
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
| function servername_pull() | |
| { | |
| if [[ ( $# -eq 0 ) || ( $1 == "--help" ) || ( $1 == "-h" ) ]] ; then | |
| echo "Usage: servername_pull PATH_FROM PATH_TO." | |
| echo "Purpose: rsync function to pull files from servername." | |
| echo " " | |
| echo "Mandatory arguments: " | |
| echo "PATH_FROM: Path on server to Rsync from" | |
| echo "PATH_TO: Path on local to Rsync to" | |
| echo " " |
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
| snippet docopt | |
| #see: https://github.com/docopt/docopt | |
| #round brackets mean required square are optional | |
| #download docopt from... | |
| #https://raw.githubusercontent.com/docopt/docopt/master/docopt.py | |
| `!p | |
| import inspect,os | |
| docopt_path=os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))+'/docopt.py' |
NewerOlder