Matthias Stecher
c24aedd4db
Because the detection of the webroot is not that good, it was removed. Now, the object id contains the full path of the nextcloud installation. This changes the installation process a bit, as it will download the tarball to /tmp rather the webroot. Also, this commit contains a bit overhaul work.
20 lines
576 B
Bash
Executable file
20 lines
576 B
Bash
Executable file
#!/bin/sh -e
|
|
# __nextcloud/explorer/version
|
|
|
|
# Check the currently installed version. Outputs nothing if nothing found.
|
|
|
|
|
|
# Get the install directory
|
|
installdir="/$__object_id"
|
|
|
|
# Check if the installation directory exists
|
|
if [ -d "$installdir" ]; then
|
|
cd "$installdir"
|
|
|
|
# if those files exist, everything should be good
|
|
if [ -f "occ" ] && [ -f "version.php" ]; then
|
|
# Detect php version with the version file.
|
|
# shellcheck disable=SC2016 # cause of the php inline code
|
|
php -r 'require("version.php"); print($OC_VersionString);'
|
|
fi
|
|
fi
|