PHP Classes

File: cli/scripts/update.sh

Recommend this page to a friend!
  Classes of Joaquin   Laravel Valet Linux   cli/scripts/update.sh   Download  
File: cli/scripts/update.sh
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Laravel Valet Linux
Run Laravel environment under a Linux machine
Author: By
Last change: Update of cli/scripts/update.sh
Date: 5 years ago
Size: 564 bytes
 

Contents

Class file image Download
#!/usr/bin/env bash set -e # Determine if the port config key exists, if not, create it function fix-config() { local CONFIG="$HOME/.valet/config.json" if [[ -f $CONFIG ]] then local PORT=$(jq -r ".port" "$CONFIG") if [[ "$PORT" = "null" ]] then echo "Fixing valet config file..." CONTENTS=$(jq '. + {port: "80"}' "$CONFIG") echo -n $CONTENTS >| "$CONFIG" fi fi } if [[ "$1" = "update" ]] then composer global update "cpriego/valet-linux" valet install fi fix-config