generated from aleckrh/laravel-sb-admin-2
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinstall.sh
executable file
·40 lines (33 loc) · 849 Bytes
/
install.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# Go to cuurent directory of this script
cd "$(dirname "$0")"
# check if the script is run as root
if [ "$EUID" -ne 0 ]
then echo "Please run as root"
exit
fi
# install dependencies: ffmpeg
# check apt
if ! [ -x "$(command -v apt)" ]; then
echo 'Error: apt is not installed.' >&2
echo 'Please install apt and try again.' >&2
exit 1
fi
# update apt
sudo apt update
# check if ffmpeg is installed
if ! [ -x "$(command -v ffmpeg)" ]; then
echo 'Error: ffmpeg is not installed.' >&2
echo 'Installing ffmpeg...'
sudo apt install ffmpeg
fi
# check if composer is installed
if ! [ -x "$(command -v composer)" ]; then
echo 'Error: composer is not installed.' >&2
echo 'Installing composer...'
sudo apt install composer
fi
# init laravel project
cp .env.example .env
composer install
php artisan key:generate
php artisan migrate