-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetupdevenvironmentUbuntu.sh
executable file
·43 lines (33 loc) · 1.18 KB
/
setupdevenvironmentUbuntu.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
41
42
43
#!/usr/bin/env bash
# If you are having trouble running this file try running 'chomd +x setupdevenvironment.sh'
echo "Installing php, unzip, npm and required php extensions"
sudo apt install php
sudo apt update && upgrade
sudo apt install php-curl php-dom php-gd php-xml php-zip php-mbstring npm unzip``
cd ../
echo "Cloning frog-hurricane-skeleton"
git clone https://github.com/memtech3/frog-hurricane-skeleton
gravZipName=grav-admin-1.7.37.1.zip
echo "Downloading grav, saving as $gravZipName"
wget https://getgrav.org/download/core/grav-admin/1.7.37.1 -O $gravZipName
echo "Unzipping grav"
unzip $gravZipName
currentPath=$(realpath ".")
gravPath="$currentPath/grav-admin"
skeletonPath="$currentPath/frog-hurricane-skeleton"
symlinkSkeletonFolder () {
echo "Symlinking user/$1"
rm -rf $gravPath/user/$1
ln -s $skeletonPath/$1 $gravPath/user/
}
symlinkSkeletonFolder "accounts"
symlinkSkeletonFolder "config"
symlinkSkeletonFolder "pages"
symlinkSkeletonFolder "plugins"
echo "Symlinking theme"
ln -s $currentPath/frog-hurricane $gravPath/user/themes
echo "Installing npm dependencies"
cd frog-hurricane
npm install
echo "Making startdevserver.sh executable"
chmod +x startdevserver.sh