:orphan: .. _ahelp_@update.afni.binaries: ********************* @update.afni.binaries ********************* .. contents:: :local: | @update.afni.binaries - update or install AFNI binaries ========================================================= .. code-block:: none This program can be used to (at least): - perform an initial install of precompiled binaries - as an admin or a non-admin user - update the current precompiled binaries - update locally compiled binaries, created using build_afni.py (but it seems like a better idea to use build_afni.py directly) Note: one can use build_afni.py to compile locally. examples: ========= 1. individual user: initial install +++++++++++++++++++++++++++++++++++ .. code-block:: none 1a. When doing initial install, always specify a package. @update.afni.binaries -package linux_ubuntu_24_64 -bindir ~/abin 1b. Also initialize the dotfiles (.cshrc, .bashrc, etc). @update.afni.binaries -package linux_ubuntu_24_64 -bindir ~/abin \ -do_dotfiles 1c. And possibly include extras like dotfile and apsearch initialization. @update.afni.binaries -package linux_ubuntu_24_64 -bindir ~/abin \ -do_extras 1d. Possibly just install a the non-binary text package with atlases, into the $HOME/abin directory. @update.afni.binaries -package anyos_text_atlas -bindir ~/abin 2. root user: initial install +++++++++++++++++++++++++++++ .. code-block:: none 2a. Install a specific package into a system directory. Such a command would apply to either an initial install or an update. @update.afni.binaries -package linux_ubuntu_24_64 \ -bindir /usr/local/AFNIbin 2b. Similar to 2a, but one can specify a path to a previously downloaded .tgz package file, so such a download would not need to be repeated. Use -local_package to specify the path to the tgz file. @update.afni.binaries -local_package linux_ubuntu_24_64.tgz \ -bindir /usr/local/AFNIbin 3. individual user: basic updates +++++++++++++++++++++++++++++++++ .. code-block:: none 3a. Basic: update the binaries and the apsearch setup (tab completion). * Note that with an update, the package is already known. * Note also that this would be appropriate for a locally compiled package as well, which would run build_afni.py. @update.afni.binaries -apsearch yes 3b. Basic: also make a backup of the current binaries. @update.afni.binaries -apsearch yes -make_backup yes 3c. Basic: -defaults would do the same, but also try to update the dotfiles. Since that step should already be done, this should be the same as 3b. @update.afni.binaries -defaults @update.afni.binaries -d 3d. Quick update, do nothing but update the current package. @update.afni.binaries -quick 3e. Update only a specific list of programs (e.g. suma and 3dRSFC). @update.afni.binaries -package linux_openmp_64 -programs suma 3dRSFC 4. other examples +++++++++++++++++ .. code-block:: none 4a. install the small, text-only package in the directory of that same name @update.afni.binaries -package anyos_text -bindir anyos_text 4b. include atlases, and install in a system directory @update.afni.binaries -package anyos_text_atlas \ -bindir /usr/local/AFNI/anyos_text_atlas 4c. test running build_afni.py, but do not install it (-build_afni is only needed if the current package was not made by it) @update.afni.binaries -build_afni -build_root ~/afni_build \ -build_opts "-do_install no" 4d. use build_afni.py to replace the current "official" package @update.afni.binaries -build_afni -build_root ~/afni_build 4e. update the current package if it was made using build_afni.py, and run the apserach updates, for tab completion (this is the same command that works for the official package) @update.afni.binaries -apsearch yes 4f. update the current package if it was made using build_afni.py, but do nothing else (just update the current package) (this is the same command that works for the official package) @update.afni.binaries -quick 4g. a quick build_afni.py update can be done in either of these ways (these commands should effectively both run the latter) @update.afni.binaries -quick build_afni.py -build_root ~/afni_build 5. other "random" examples: +++++++++++++++++++++++++++ .. code-block:: none @update.afni.binaries -apsearch yes @update.afni.binaries -d @update.afni.binaries -defaults -package macos_10.12_local @update.afni.binaries -package linux_openmp_64 -bindir ~/abin @update.afni.binaries -package linux_openmp_64 \ -programs file_tool python_scripts/*.py @update.afni.binaries -show_obsoletes @update.afni.binaries -local_package macos_10.12_local.tgz options: ======== .. code-block:: none -help : show this help -help_sys_progs : list system programs that block update See -sys_ok for details. -apsearch yes/no : specify getting apsearch updates -bindir ABIN : set AFNI binary directory to ABIN -build_afni : specify to use build_afni.py, regardless This option will for the installation process to use build_afni.py. That is to say, rather than downloading and installing a previously compiled binary package from the AFNI website (an "official" release), use build_afni.py to compile an AFNI package locally. If the currently installed AFNI package was made using build_afni.py, then this option is not necessary. See also -build_root and -build_opts. -build_opts "OPT LIST" : specify a list of options to pass to build_afni.py e.g. -build_opts "-do_install no" If build_afni.py will be used for compiling new binaries, include the given options in the command. To make programming easier in this shell script, this list of options should be contained in quotes, so that this program sees it as a single argument. -build_root DIR : specify a directory for build_afni.py to work under default -build_root ~/afni_build e.g. -build_root some/other/dir If build_afni.py will be used for compiling new binaries, ~/afni_build will be used for such work by default. Use this option to specify an alternate location. -curl : default to curl instead of wget -defaults : install current package into abin -d : (short for -defaults) This would be the method to 'update the package that I am currently using'. This option implies -do_dotfiles, -apsearch yes, and -make_backup yes. The package would be decided by 'afni -ver' and the directory would come from 'which afni'. If either of these is not appropriate, the package would be determined by the OS (Linux or OSX allowed, 32 or 64-bits), and the install dir would be ~/abin. If -bindir or -package cannot be determined, it must be supplied by the user. 26 Sep 2012 : -update_apsearch is applied by default (if installed afni is in PATH) -do_dotfiles : if needed, try to initialize dot files If .cshrc (or maybe .tcshrc) or .bashrc or .zshrc do not have the AFNI binary directory in the file (grep), add a line to update the PATH in each file. All files are updated (if need be). Also, if on a mac, set DYLD_LIBRARY_PATH in similar files. Also, init .afnirc and .sumarc if they do not yet exist. * This option has no effect for the root user. -do_extras : do extra niceties (beyond simple install) This is a convenience option that implies: -apsearch yes -do_dotfiles -make_backup yes This has come full-circle to be the same as -defaults. -echo : turn on shell command echo This will be like running the script with "tcsh -x". -make_backup yes/no : make a backup of binaries before replacing default: no (but it is 'yes' with -do_extras or -defaults) Specify whether to make a backup of the current binaries. Since the default is currently yes, the likely use would be 'no'. -no_cert_verify : do not verify the server CA certificate This option is regarding SSL/TLS Certificate Verification via some CA (certificate authority) list. It may be needed if the client CA list does not recognize the certificate provided by the afni server. For curl, this appends the '--insecure' option. For wget, this appends the '--no-check-certificate' option. To check whether curl requires this, look for WinSSL in the output from: curl -V See https://curl.haxx.se/docs/sslcerts.html for details. -no_recur : do not download and run new @uab script -local_package PACKAGE : install local PACKAGE.tgz package This is a way to install an existing tgz file without needed to download it. -prog_list PROGRAMS : install given programs, not whole PACKAGE With this option, the listed programs would be installed, rather than the entire PACKAGE. Note: directories are not allowed (e.g. meica.libs) -package PACKAGE : install distribution package PACKAGE (see also -local_package) -prog_list PROGRAMS : install given programs, not whole PACKAGE With this option, the listed programs would be installed, rather than the entire PACKAGE. Note: directories are not allowed (e.g. meica.libs) For example, consider: -prog_list suma python_scripts/*.py In this case, suma and the individual python files would all end up in abin, with no directories. -proto PROTOCOL : access afni host via this PROTOCOL e.g. -proto http default: https Use this option to specify the download protocol. PROTOCOL may https, http or NONE (meaning not to prefix site name with any). -quick : quick mode, no fancies This option blocks unwanted or unneeded actions, mostly for testing. It basically applies: -no_recur -apsearch no -show_obsoletes : list any obsolete packages Display the set of AFNI packages that are no longer being updated. This is a terminal option. -show_obsoletes_grep : list any obsolete packages (easy to grep) Display the set of AFNI packages that are no longer being updated. This is the same as -show_obsoletes, but each line with a package name will start with "obsolete:", as in: obsolete: linux_gcc32 obsolete: linux_gcc33_64 obsolete: macosx_10.7_Intel_64 obsolete: macosx_10.7_local This is a terminal option. -show_system_progs : show system programs that do no belong in abin Display the set of system utilities that suggest afni is in a system binary directory, rather than a user's abin. If any such program is in the AFNI binaries directory, an update will not be allowed. This was introduced to protect from 'afni' being in under /usr/bin in Neurodebian. -sys_ok : OK to update, even if system progs found If any system program (e.g. man, sudo, xterm, yum) is found, the default behavior is not to continue the update. Note that if 'afni -ver' shows a Debian package, then updates should be done via apt-get, not this program. Use -sys_ok to all the update to proceed. See -help_sys_progs for a list of checked system programs. -test : just attempt the download and quit -test_protos : test download protocols and exit -revert : revert binaries to previous version Revert the AFNI binaries to those in directory ABIN/auto_backup.PACKAGE, where ABIN would otherwise be considered the installation directory. Use this option if the last update of the binaries got you a lump of coal. There should be only 1 backup to revert to. One cannot revert back 2 levels, say. Note that the user must have write permissions in the ABIN directory.