mirror of
https://github.com/laravel/valet.git
synced 2026-02-06 16:50:09 +01:00
24 lines
506 B
Bash
Executable File
24 lines
506 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
|
|
if [ ! -f "$DIR/valet.php" ]
|
|
then
|
|
OLDPWD=$PWD
|
|
cd $DIR/../laravel/valet
|
|
DIR=$(pwd)
|
|
cd $OLDPWD
|
|
fi
|
|
|
|
if [[ $1 = "install" ]] || [[ $1 = "start" ]] || [[ $1 = "restart" ]] || [[ $1 = "stop" ]] || [[ $1 = "uninstall" ]]
|
|
then
|
|
sudo php $DIR/valet.php $@
|
|
elif [[ $1 = "share" ]]
|
|
then
|
|
bash $DIR/fetch-share-url.sh &
|
|
$DIR/bin/ngrok http -host-header=rewrite ${PWD##*/}.dev:80
|
|
else
|
|
php $DIR/valet.php $@
|
|
fi
|
|
|