How do I make a bash script so that I can drag its input on top of the icon? I need to make a bash script to that I can drag a .rar file on top of it and then the script will receive the pathname of that file as argument 1 ($1). 

I have made the bash script, but how do I make it to be an application (right now MAC OSX is treating it as a text file even though I did chmod +x) and how do I enable the drag and drop way of sending a file to my script?
You should be able to turn your script into an application with Automator - Applications -&gt; Utilities -&gt; Automator.app. Look for an option called "Run Shell Script" and once you're done, it should behave like other apps in that anything that is dragged and dropped on it will be run with it. Good luck!