dotfiles

<-- duh.
git clone https://hhvn.uk/dotfiles
git clone git://hhvn.uk/dotfiles
Log | Files | Refs | Submodules | LICENSE

sshtar (427B)


      1 #!/bin/sh
      2 
      3 [ "$(echo "$1" | grep "help")" != "" ] && printf '
      4 	sshtar [files] [remote host]\n' && exit
      5 
      6 last=""
      7 all=""
      8 
      9 for word in "$@"
     10 do
     11 	last="$word"
     12 	all="$all $word"
     13 done
     14 
     15 first=$(echo "$all" | sed "s/$last$//g;s/^ //g")
     16 tar cjvf /tmp/sshtar.tar.bz $first
     17 user=$(echo "$last" | grep -o "^[A-Za-z0-9]*")
     18 clear
     19 scp /tmp/sshtar.tar.bz $last:/home/$user
     20 clear
     21 printf "You gotta extract the stuff yourself now.\n\n"
     22 ssh $last