about summary refs log tree commit diff
path: root/pkgs/build-support/php/hooks/php-script-utils.bash
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/build-support/php/hooks/php-script-utils.bash')
-rw-r--r--pkgs/build-support/php/hooks/php-script-utils.bash12
1 files changed, 12 insertions, 0 deletions
diff --git a/pkgs/build-support/php/hooks/php-script-utils.bash b/pkgs/build-support/php/hooks/php-script-utils.bash
new file mode 100644
index 000000000000..163d9306f5f4
--- /dev/null
+++ b/pkgs/build-support/php/hooks/php-script-utils.bash
@@ -0,0 +1,12 @@
+declare version
+
+setComposeRootVersion() {
+    set +e # Disable exit on error
+
+    if [[ -v version ]]; then
+        echo -e "\e[32mSetting COMPOSER_ROOT_VERSION to $version\e[0m"
+        export COMPOSER_ROOT_VERSION=$version
+    fi
+
+    set -e
+}