If you tried installing the newest Sencha Cmd on Linux (3.1.2.xxx currently) but you didn’t want to add the newly created directory to your path the first thing you might have tried was to symlink to it from a common area.
This way your users don’t have to change their paths or remember where you did the install.

$ ls -l bin/sencha
lrwxrwxrwx 1 root root 30 Jun 5 16:56 bin/sencha -> ../Sencha/Cmd/3.1.2.341/sencha

But that doesn’t work because the script looks for it’s dependencies based on it’s location:

$ sencha
Sencha Cmd folder (/usr/local/bin) is missing sencha.cfg - aborting!

So you try symlinking the config file:

$ cd /usr/local/bin/
$ sudo ln -s ../Sencha/Cmd/3.1.2.341/sencha.cfg .


$ sencha
Error: Unable to access jarfile /usr/local/bin/sencha.jar

Well we can see this is going to get tedious…

The solution is simple but requires you modify the shell script wrapper that Sencha provides (sencha) to use the readlink command to de-reference back to the actual install directory.

-BASEDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+BASEDIR="$( cd "$( dirname $( readlink -m -n "${BASH_SOURCE[0]}" ) )" && pwd )"

Cool, now it works:

$ sencha
Sencha Cmd v3.1.2.342
...

You can also see my suggestion on the Sencha forum:
http://www.sencha.com/forum/showthread.php?265378-Minor-enhancement-to-Sencha-Cmd-(symlink-support)