#!/bin/bash


update_path=/var/www/update
#重启队列
#sudo bash runServes.sh



# shellcheck disable=SC2045
# shellcheck disable=SC2006
for file in `ls $update_path`
     do
        if [ "composer.json" = "$file" ]; then
            sudo composer install
        elif [ "package.json" == "$file" ]; then
            sudo yarn install
        elif [ "resources" == "$file" ]; then
            sudo yarn run prod
        elif [ "database" == "$file" ]; then
            sudo php artisan migrate
        fi
    done


