-
-
Save diniremix/1370410 to your computer and use it in GitHub Desktop.
Bash script for github.com/x URL:s -> git.io
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function shit() { | |
if [ -n "$2" ]; then | |
curl -i http://git.io -F url=https://github.com/"$1" -F code="$2"; | |
else | |
curl -i http://git.io -F url=https://github.com/"$1"; | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I made some modifications to original Shit because when function calls, not sending the parameters and the option if [ -n "$ 2" ] is not validated and jumped default option 1.
Parameters are now stored in variables and used within the main function.
the modified program is here https://github.com/diniremix/shit2
thank you very much for this.