-
Notifications
You must be signed in to change notification settings - Fork 7
SwitchVersionSh
The main purpose of switchVersion.sh
is to allow for quick up-/downgrades of your TYPO3 core.
$ ./switchVersion.sh --help
Usage: ./switchVersion.sh [OPTIONS]
Core:
--help Display this help and exit.
--verbose Display more detailed messages.
--quiet Do not display anything.
--force Perform actions that would otherwise abort the script.
--update Tries to update the script to the latest version.
--update-check Checks if a newer version of the script is available.
--export-config Prints the default configuration of this script.
--extract-config Extracts configuration parameters from TYPO3.
--base=PATH The name of the base path where TYPO3 is
installed. If no base is supplied, "typo3" is used.
Options:
--version=VERSION The version to switch to.
--store=PATH Where your TYPO3 packages are stored
For general information regarding the configuration of scripts in the typo3scripts suite, please see the article about Configuration.
-
Prints the output seen above, giving an overview of available command line parameters.
-
Enable verbose (more detailed) output.
-
Reduced verbosity (less detailed) output.
-
Perform actions that would otherwise stop execution.
-
Invokes the self-updating mechanism in this script. This will download the latest release version from the official source code repository and replace your current script.
Note: To perform a quick check if a new version is available, run
switchVersion.sh
with the--update-check
parameter. If a new version is found online, the following message will be printed to the standard output:NOTE: New version available!
In previous versions, this check would be performed every time you run the script.
-
Print the default configuration of the script to the standard output.
This allows for easy generation of a default config file, like so:
$ ./switchVersion.sh --export-config > typo3scripts.conf
-
Tries to read the database-related parameters out of the TYPO3 configuration file.
This allows for easy generation of a base config file for other typo3scripts after you have completed your TYPO3 installation.
$ ./switchVersion.sh --extract-config > typo3scripts.conf
In case you're using a non-default TYPO3 installation directory, make sure to supply the
--base
parameter before the--extract-config
parameter.$ ./switchVersion.sh --base=myt3site --extract-config > typo3scripts.conf
Note: This functionality is currently not compatible with TYPO3 6.0 configuration file format.
-
By default, it is assumed that the TYPO3 installation is located in a sub-folder relative to the current working directory, named typo3. Use --base if the installation is placed in a differently named sub-folder.
$ ./switchVersion.sh --base=myt3site 4.7.7
-
The version of TYPO3 we should switch to.
-
The path where TYPO3 packages should be stored. By default, downloaded TYPO3 packages are placed inside the
BASE
directory. However, you can define a separate directory where all packages should be placed. This allows you to share the packages between multiple TYPO3 installations.$ ./switchVersion.sh --store=../typo3 4.7.7
/var/www$ cd t3site/
/var/www/t3site$ wget https://raw.github.com/oliversalzburg/typo3scripts/master/switchVersion.sh
/var/www/t3site$ chmod 700 switchVersion.sh
/var/www/t3site$ ./switchVersion.sh 4.6.3
Sourcing script configuration from typo3scripts.conf...Done.
Checking dependencies...Succeeded.
Looking for TYPO3 source package at typo3/typo3_src-4.6.3/...NOT found! Downloading.
Downloading http://prdownloads.sourceforge.net/typo3/typo3_src-4.6.3.tar.gz...Done.
Extracting source package typo3/typo3_src-4.6.3.tar.gz...Done.
Switching TYPO3 source symlink to typo3/typo3_src-4.6.3/...Done.
Checking if index.php needs to be updated...Done.
Deleting temp_CACHED_* files from typo3conf...Done!
Version switched to 4.6.3.
This example assumes that you previously created a configuration file typo3scripts.conf
to share between scripts. Please see the article about Configuration for more information.