Skip to content

Instantly share code, notes, and snippets.

@invisiblek
Created August 3, 2014 02:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save invisiblek/5f9a5af8945a7e283792 to your computer and use it in GitHub Desktop.
Save invisiblek/5f9a5af8945a7e283792 to your computer and use it in GitHub Desktop.
#!/bin/bash
if [[ -z $1 ]]
then
echo "Must specify filename!"
echo "ex: upload kernel.zip"
exit 1
fi
filename=$1 #`ls $1 | xargs -n 1 basename`
scp $1 loudbit.co:/home/invisiblek/$2/$filename
if [[ $2 == *public_html* ]]; then
uploadfolder=`echo $2 | sed 's/public_html//g'`
bitly.py http://download.invisiblek.org/$uploadfolder/$1
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment