Syntax: !update [-f] [-p prefix] [-o osname]This command can be used to check for, download, and install updates to the program. It makes contact to the distribution area of the Whiteley Research Inc. web site via the internet.
In order to use this command, a .wrpasswd file must be installed in the user's home directory. The !passwd command is used to create this file.
If given without arguments, the command first checks for the existence of a new release. If no newer release is available, the command will print a message indicating that the program is up-to-date and exit. Otherwise, the user is prompted whether to download the distribution file for the new release. If the user agrees, the release file will be downloaded to a temporary directory. Once downloaded, the user is prompted whether to install the new release. If the user agrees, the distribution file will be expanded and the files installed in place of the current release. The present program will still exist (it is always available as the program name with a ``.old'' extension) and the user can continue working. Subsequent invocations of the program will start the new version.
Under Windows, installation will require that the user exit the program and run the downloaded file.
On other operating systems, a shell window will appear, and the user will be prompted for a password. By default, the shell window uses the ``sudo'' command for password authentication, therefor:
This behavior can be modified by setting the InstallCmdFormat variable. In particular, if you don't want to use sudo for some reason, su can be used instead, by setting the InstallCmdFormat variable to the string
xterm -e su root -c \"%s \"In this case, the password entered should be the root password, and only one chance is given to enter the correct password (sudo will re-prompt if the entered password is incorrect).
The !update command can be run separately to download and install the distribution file - if the file is found in the temporary directory, and the -f option is not given, the downloading step is skipped. Beware, however, that if a network hiccup truncates or corrupts the downloaded file, there will be a problem. If this happens, the -f option, which forces downloaing even if the file already exists locally, or the system is up-to-date, should be used. Alternatively, the corrupt file can be removed by hand.
The -p prefix argument applies during installation only, and overrides the installation location prefix. If not given, this will default to the prefix used in the current program installation, which defaults to /usr/local. If given, the prefix must be a rooted directory path.
The -o osname argument allows downloading of a distribution that is not the same ``operating system'' as the running program. The osname must be one of the distribution names as used in the distribution repository. The table below lists the currently recognized names, though not all of these may be active.
Darwin | OS X 10.4 universal |
Darwin64 | OS X 10.6 x86_64 |
Debian | Debian/Ubuntu 32-bit package |
FreeBSD7 | FreeBSD 7.1 i386 |
Linux2 | Red Hat Linux 7.2 i686 |
LinuxRHEL3 | Red Hat Enterprise 3 i686 |
LinuxRHEL3_64 | Red Hat Enterprise 3 x86_64 |
LinuxRHEL5 | Red Hat Enterprise 5 i686 |
LinuxRHEL5_64 | Red Hat Enterprise 5 x86_64 |
Win32 | Microsoft Windows |
Then, the corresponding file will be downloaded and installed, if the user affirms each step and installation is possible. The file will be downloaded whether or not the running program is current.
The installation step may well fail if the running operating system is incompatible with the distribution. You can install different versions of Linux on a Linux machine, or Linux on FreeBSD (if the rpm package is installed) for example, but not Win32 on anything but Windows.