diff options
author | Mario Vavti <mario@mariovavti.com> | 2022-03-29 11:42:53 +0200 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2022-03-29 11:42:53 +0200 |
commit | 0784cd593a39a4fc297e8a82f7e79bc8019a0868 (patch) | |
tree | 22182afb37cf460f8208fff9d276a0672add3185 /vendor/bin/naturalselection | |
parent | 0e2e9321025f87fe9587f3d183adaea6185e4e20 (diff) | |
parent | 9c5d2ee5630dd7033904039dcd1e92db8821b644 (diff) | |
download | volse-hubzilla-0784cd593a39a4fc297e8a82f7e79bc8019a0868.tar.gz volse-hubzilla-0784cd593a39a4fc297e8a82f7e79bc8019a0868.tar.bz2 volse-hubzilla-0784cd593a39a4fc297e8a82f7e79bc8019a0868.zip |
Merge branch '7.2RC'7.2
Diffstat (limited to 'vendor/bin/naturalselection')
-rwxr-xr-x[l---------] | vendor/bin/naturalselection | 38 |
1 files changed, 37 insertions, 1 deletions
diff --git a/vendor/bin/naturalselection b/vendor/bin/naturalselection index e6f1b3a2a..586050de8 120000..100755 --- a/vendor/bin/naturalselection +++ b/vendor/bin/naturalselection @@ -1 +1,37 @@ -../sabre/dav/bin/naturalselection
\ No newline at end of file +#!/usr/bin/env sh + +# Support bash to support `source` with fallback on $0 if this does not run with bash +# https://stackoverflow.com/a/35006505/6512 +selfArg="$BASH_SOURCE" +if [ -z "$selfArg" ]; then + selfArg="$0" +fi + +self=$(realpath $selfArg 2> /dev/null) +if [ -z "$self" ]; then + self="$selfArg" +fi + +dir=$(cd "${self%[/\\]*}" > /dev/null; cd '../sabre/dav/bin' && pwd) + +if [ -d /proc/cygdrive ]; then + case $(which php) in + $(readlink -n /proc/cygdrive)/*) + # We are in Cygwin using Windows php, so the path must be translated + dir=$(cygpath -m "$dir"); + ;; + esac +fi + +export COMPOSER_BIN_DIR=$(cd "${self%[/\\]*}" > /dev/null; pwd) + +# If bash is sourcing this file, we have to source the target as well +bashSource="$BASH_SOURCE" +if [ -n "$bashSource" ]; then + if [ "$bashSource" != "$0" ]; then + source "${dir}/naturalselection" "$@" + return + fi +fi + +"${dir}/naturalselection" "$@" |