How to make a script which runs on login?
Yes that script should run on OS X. It is a .sh file and it's using the bash shell, so I'd assume that it would run, unless it requires programs that aren't installed on OS X by default.
To have it run on login:
Just go to System Preferences > Users &amp; Groups and click on the user that you want the script to load. Click the + button to add a login item and navigate to your script. The script will load automatically on login.