1
0
mirror of https://github.com/laravel/valet.git synced 2026-02-07 01:00:09 +01:00

move scripts

This commit is contained in:
Taylor Otwell
2016-05-10 15:06:29 -05:00
parent 6a88aac3fb
commit 6345ee9503
4 changed files with 10 additions and 10 deletions

View File

@@ -0,0 +1,5 @@
#!/usr/bin/env bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
php $DIR/../valet.php fetch-share-url | pbcopy

51
cli/scripts/install.sh Normal file
View File

@@ -0,0 +1,51 @@
#!/usr/bin/env bash
# Install Homebrew for dependency management
if [[ ! $(which brew -A) ]]
then
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
fi
brew install wget > /dev/null 2>&1
# Install PHP 7.0
brew tap homebrew/dupes
brew tap homebrew/versions
brew tap homebrew/homebrew-php
brew unlink php56 > /dev/null 2>&1
brew install php70
# Install Composer to /usr/local/bin
if [[ ! $(which composer -A) ]]
then
echo "Installing Composer..."
/usr/local/bin/php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
/usr/local/bin/php -r "if (hash_file('SHA384', 'composer-setup.php') === '92102166af5abdb03f49ce52a40591073a7b859a86e8ff13338cf7db58a19f7844fbc0bb79b2773bf30791e935dbd938') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" > /dev/null 2>&1
/usr/local/bin/php composer-setup.php > /dev/null 2>&1
/usr/local/bin/php -r "unlink('composer-setup.php');"
mv composer.phar /usr/local/bin/composer
chmod +x /usr/local/bin/composer
fi
COMPOSER_PATH=$(which composer)
# Download and unpack the latest Valet release
rm -rf $HOME/.valet-cli
mkdir $HOME/.valet-cli
echo "Downloading Valet..."
wget https://github.com/laravel/valet/archive/master.tar.gz -O $HOME/.valet-cli/valet.tar.gz > /dev/null 2>&1
tar xvzf $HOME/.valet-cli/valet.tar.gz -C $HOME/.valet-cli --strip 1 > /dev/null 2>&1
rm /usr/local/bin/valet
ln -s $HOME/.valet-cli/valet /usr/local/bin/valet
chmod +x /usr/local/bin/valet
# Install Valet's Composer dependencies
echo "Installing Valet's Composer dependencies..."
/usr/local/bin/php $COMPOSER_PATH install -d $HOME/.valet-cli > /dev/null 2>&1
# Run the Valet installation process
$HOME/.valet-cli/valet install

17
cli/scripts/update.sh Normal file
View File

@@ -0,0 +1,17 @@
#!/usr/bin/env bash
# Remove existing Valet directory
rm -rf $HOME/.valet-cli
# Download and unpack the latest Valet release
mkdir $HOME/.valet-cli
echo "Downloading latest release of Valet..."
wget https://github.com/laravel/valet/archive/master.tar.gz -O $HOME/.valet-cli/valet.tar.gz > /dev/null 2>&1
tar xvzf $HOME/.valet-cli/valet.tar.gz -C $HOME/.valet-cli --strip 1 > /dev/null 2>&1
# Install Valet's Composer dependencies
echo "Installing Valet's Composer dependencies..."
/usr/local/bin/php /usr/local/bin/composer install -d $HOME/.valet-cli > /dev/null 2>&1
# Run the Valet installation process
$HOME/.valet-cli/valet --version