]> git.armaanb.net Git - config.org.git/commitdiff
zsh: add pubup script
authorArmaan Bhojwani <me@armaanb.net>
Thu, 6 May 2021 00:30:21 +0000 (20:30 -0400)
committerArmaan Bhojwani <me@armaanb.net>
Thu, 6 May 2021 00:30:28 +0000 (20:30 -0400)
config.org

index f4cd24ac6a480e6c5d2836e9e5270c12b5ad1203..57b56c5a662f0cf73900179316c808ae2f104c6f 100644 (file)
@@ -970,6 +970,13 @@ Right now, I'm only using fast-syntax-highlighting. It's a really nice visual ad
       echo $user | nc "$host" 79 -N
   }
 #+end_src
+**** Upload to ftp.armaanb.net
+#+begin_src shell :tangle ~/.config/zsh/zshrc
+  pubup() {
+      rsync "$1" "root@armaanb.net:/var/ftp/pub/${2}"
+      echo "https://ftp.armaanb.net/pub/"$(basename "$1") | tee /dev/tty | xclip -sel c
+  }
+#+end_src
 *** Aliases
 **** SSH
 #+begin_src shell :tangle ~/.config/zsh/zshrc