Skip to content
This repository was archived by the owner on Apr 13, 2021. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .bash_xp
Original file line number Diff line number Diff line change
Expand Up @@ -114,3 +114,13 @@ function parse_git_tag() { # Git Tag

# PS1 Line
PS1="\[\e[00;33m\]\u\[\e[0m\]\[\e[00;37m\]@\h:\[\e[0m\]\[\e[0;31m\]\`parse_git_branch\`\[\e[m\]\[\e[0m\]\[\e[0;38m\]\`parse_git_tag\`\[\e[m\]\[\e[00;36m\][\w]\[\e[0m\]\[\e[00;32m\]\nbash> \[\e[0m\]"

# Create a SSH connection, go to a directory and creates a tar.gz with the contents found
tar_ssh_pipe ()
{
if [ $# -eq 3 ]; then
ssh $1 "cd $2 && tar -cf - * | gzip -9" > $3.tar.gz
else
echo "No host, directory path and filename specified"
fi;
}