Skip to content

Instantly share code, notes, and snippets.

@lopadz
Last active March 30, 2019 18:58
Show Gist options
  • Save lopadz/cf81f795f395020db0c8b5ec6ceeb48c to your computer and use it in GitHub Desktop.
Save lopadz/cf81f795f395020db0c8b5ec6ceeb48c to your computer and use it in GitHub Desktop.
Simple ZSH script to upload files to Firefox Send with FFSEND
#!/bin/zsh
# REQUIREMENTS:
# FFSEND CLI: https://github.com/timvisee/ffsend
# oh-my-zsh: https://github.com/robbyrussell/oh-my-zsh
# RECOMMENDED:
# Create alias adding these lines to your .zshrc file. Don't forget to run source .zshrc after you add them:
#if [ -f $HOME/Dropbox/scripts/.ffsend_script ]; then
# alias fs_up='$HOME/Dropbox/scripts/FFSEND/.ffsend_script'
#fi
# VARIABLES
HISTORY="$HOME/Dropbox/scripts/FFSEND/.history"
BASIC_AUTH="USER:PASSWORD"
# SCRIPT
echo Enter File to Upload:
read FILE_TO_UPLOAD
ffsend up --copy --history $HISTORY --basic-auth $BASIC_AUTH $FILE_TO_UPLOAD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment