Wednesday, September 24, 2014

How to setup a script for you Apps/binary executables which are not installed via command line OR app store

I will use s3cmd as a example to show how to setup a script for your apps/binaries which are not installed via command line Or app store.

1) Download s3cmd package from http://s3tools.org/download
2) extract it, and you should get a folder called s3cmd-master
3) put the folder to anywhere you want (at here I move it to ~/)
4) create a script called s3cmd under dir /usr/local/bin/ and put the following lines as its content.
#!/bin/sh
~/s3cmd-master/s3cmd $*

5) make the created script executable: sudo chmod +x /usr/local/bin/s3cmd

DONE and you should able to use s3cmd command without specify the full path.