Subversion-Projekte lars-tiefland.laravel_shop

Revision

Zur aktuellen Revision | Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
148 lars 1
#!/usr/bin/env sh
2
 
3
# Support bash to support `source` with fallback on $0 if this does not run with bash
4
# https://stackoverflow.com/a/35006505/6512
5
selfArg="$BASH_SOURCE"
6
if [ -z "$selfArg" ]; then
7
    selfArg="$0"
8
fi
9
 
10
self=$(realpath $selfArg 2> /dev/null)
11
if [ -z "$self" ]; then
12
    self="$selfArg"
13
fi
14
 
15
dir=$(cd "${self%[/\\]*}" > /dev/null; cd '../laravel/sail/bin' && pwd)
16
 
17
if [ -d /proc/cygdrive ]; then
18
    case $(which php) in
19
        $(readlink -n /proc/cygdrive)/*)
20
            # We are in Cygwin using Windows php, so the path must be translated
21
            dir=$(cygpath -m "$dir");
22
            ;;
23
    esac
24
fi
25
 
26
export COMPOSER_RUNTIME_BIN_DIR="$(cd "${self%[/\\]*}" > /dev/null; pwd)"
27
 
28
# If bash is sourcing this file, we have to source the target as well
29
bashSource="$BASH_SOURCE"
30
if [ -n "$bashSource" ]; then
31
    if [ "$bashSource" != "$0" ]; then
32
        source "${dir}/sail" "$@"
33
        return
34
    fi
35
fi
36
 
37
"${dir}/sail" "$@"