Merge Installed Programs Into One Directory: Difference between revisions
No edit summary |
No edit summary |
||
| (One intermediate revision by one other user not shown) | |||
| Line 1: | Line 1: | ||
On Linux | On POSIX systems (Linux and OSX), it's convenient to have all of your installed programs in just a couple directories, so that they can be called from the command line via the <tt>PATH</tt> variable. For example, most programs in Linux live in the directories <tt>/bin</tt> and <tt>/usr/bin</tt>. In [[$G]], programs get installed into a Windows-style directory hierarchy (on Linux, it's <tt>$G/install_linux</tt>) that can be difficult to use from a POSIX command line. | ||
The | The script <code>$G/common/build/kit/linkbins.py</code> exists to map the $G install directory onto a flat directory of your choice, so that you can easily call programs in $G when working from the command line. | ||
<pre>$G/common/build/kit/linkbins.py [<Source>] <Dest></pre> | |||
* '''<tt>Source</tt>''' is the path of a directory that is the root of a directory hierarchy full of programs. When omitted it defaults to: <tt>$G/install_$GARCH/bin</tt>. | |||
* '''<tt>Dest</tt>''' is the path of a directory to be populated with softlinks to the programs found in <tt>Source</tt>. | |||
The script assumes that the names of programs in <tt>Source</tt> follow the conventions for the build systems. The softlinks are simplified basenames without suffixes so they are easy to enter from the command line. For example, <tt>mridfit-gccx</tt> becomes the destination for a link called <tt>mridfit</tt>. Note that this script does not detect program name collisions---that is, if two programs in different projects have the same name, only one of them will be represented in the "flat" directory this script creates. | |||
For further details, run the following with no arguments: | |||
<pre>$G/common/build/kit/linkbins.py</pre> | |||
[[Category:Software Development]] | |||
Latest revision as of 13:10, 2 March 2011
On POSIX systems (Linux and OSX), it's convenient to have all of your installed programs in just a couple directories, so that they can be called from the command line via the PATH variable. For example, most programs in Linux live in the directories /bin and /usr/bin. In $G, programs get installed into a Windows-style directory hierarchy (on Linux, it's $G/install_linux) that can be difficult to use from a POSIX command line.
The script $G/common/build/kit/linkbins.py exists to map the $G install directory onto a flat directory of your choice, so that you can easily call programs in $G when working from the command line.
$G/common/build/kit/linkbins.py [<Source>] <Dest>
- Source is the path of a directory that is the root of a directory hierarchy full of programs. When omitted it defaults to: $G/install_$GARCH/bin.
- Dest is the path of a directory to be populated with softlinks to the programs found in Source.
The script assumes that the names of programs in Source follow the conventions for the build systems. The softlinks are simplified basenames without suffixes so they are easy to enter from the command line. For example, mridfit-gccx becomes the destination for a link called mridfit. Note that this script does not detect program name collisions---that is, if two programs in different projects have the same name, only one of them will be represented in the "flat" directory this script creates.
For further details, run the following with no arguments:
$G/common/build/kit/linkbins.py