You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
1.1 KiB
Bash
41 lines
1.1 KiB
Bash
#/bin/bash
|
|
|
|
echo "================= rsync files =================";
|
|
rsync -av --delete --exclude=vendor --exclude=runtime /data/project/payment/ /home/project/payment;
|
|
|
|
echo ""
|
|
|
|
while getopts "io" opt; do
|
|
case $opt in
|
|
i)
|
|
echo "================= composer install =================";
|
|
echo "dist:"
|
|
cd /home/project/payment;
|
|
composer install;
|
|
echo ""
|
|
echo "source:"
|
|
cd /data/project/payment;
|
|
composer install;
|
|
echo ""
|
|
;;
|
|
o)
|
|
echo "================= composer dump-autoload -o =================";
|
|
echo "dist:"
|
|
cd /home/project/payment;
|
|
composer dump-autoload -o;
|
|
echo ""
|
|
echo "source:"
|
|
cd /data/project/payment;
|
|
composer dump-autoload -o;
|
|
echo ""
|
|
;;
|
|
\?)
|
|
echo "Invalid option: -$OPTARG"
|
|
echo ""
|
|
;;
|
|
esac
|
|
done
|
|
|
|
echo "================= start payment =================";
|
|
cd /home/project/payment;
|
|
php bin/hyperf.php start; |