jcanfield
9/29/2012 - 9:18 PM

Git.io Generator (Bash Script)

Git.io Generator (Bash Script)

#!/bin/bash
##
## Usage: gitrepo-shorten.sh username/repository.git urlshortenedname

echo "--> Creating git.io address for your Repository..."

curl -i http://git.io -F "url=https://github.com/$1" \
    -F "code=$2"

echo "--> Created http://git.io/$2 ..."

exit
#!/bin/bash
##
## Usage: gist-shorten.sh gistID urlshortenedname

echo "--> Creating git.io address for your Gist..."

curl -i http://git.io -F "url=https://gist.github.com/$1" \
    -F "code=$2"

echo "--> Created http://git.io/$2 ..."

exit