Merge Installed Programs Into One Directory

From VrlWiki
Jump to navigation Jump to search

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