|
|
@@ -1,32 +1,25 @@
|
|
|
#!/bin/bash
|
|
|
|
|
|
-#project_path=/var/www/testwas
|
|
|
-#update_path=/var/www/update
|
|
|
+
|
|
|
+update_path=/var/www/update
|
|
|
#重启队列
|
|
|
#sudo bash runServes.sh
|
|
|
-#进入项目目录
|
|
|
-#cd $1
|
|
|
-#将项目文件中3分钟之前改动的文件存到update文件
|
|
|
-#find -mmin -3 |xargs -I {} cp {} -u -t $update_path
|
|
|
|
|
|
-#for file in `ls $update_path`
|
|
|
-# do
|
|
|
-# if test -f $file
|
|
|
-# then
|
|
|
-# echo "file: $file"
|
|
|
-# elif test -d $file
|
|
|
-# then
|
|
|
-# echo "path: $file"
|
|
|
-# fi
|
|
|
-# done
|
|
|
|
|
|
-for file in `ls /var/www/update`
|
|
|
- do
|
|
|
- if [ "Haozi"!="$file" ]; then
|
|
|
- echo "$file haozi"
|
|
|
- elif [ "index"==$file ]; then
|
|
|
- echo "$file"
|
|
|
+
|
|
|
+# 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
|
|
|
else
|
|
|
echo "11"
|
|
|
fi
|
|
|
done
|
|
|
+
|
|
|
+
|