The sp-links program

sp-links /package/admin/foo/command /command /usr/local/bin

sp-links finds files in the first directory and creates symlinks pointing to them in the remaining directories. Normally, it will atomically replace any existing files or symlinks with the same names, but if $SP_REPLACE_LINKS is set to "n", it will leave existing files as they are, and warn if it encounters an existing file or symlink pointing to a different target command. The target directories are created if they do not exist, but their parent directories must already exist.