cdist-contrib/type/__nextcloud/explorer/version

21 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