-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathwpinstall-tocompile.sh
More file actions
executable file
·44 lines (33 loc) · 1018 Bytes
/
wpinstall-tocompile.sh
File metadata and controls
executable file
·44 lines (33 loc) · 1018 Bytes
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
#!/bin/bash
if [ "$(uname)" != "Linux" ]; then rpath=`readlink "$0"`; else rpath=`readlink -f "$0"`; fi;
abs_path=$(dirname "$rpath")
dir=$1
install_path=$(pwd)/$dir
. $abs_path/helpers.sh
if [ "$dir" == "" ]; then
read -p "Vous n'avez pas indiqué de répertoire d'installation, Wordpress sera installé ici : "$install_path", ok [Y,n] : " yn
if [[ ! $yn =~ ^[Yy]$ ]]
then
echo "Ok, ok... on arrête tout."
exit 1
fi
else
if [ -d $dir ] || [ -f $dir ]; then echo "Ce répertoire existe déjà, on arrête tout."; exit 1; fi
fi
if [ -d $install_path/web ]; then echo "Un projet wordpress est déjà présent, on arrête tout."; exit 1; fi
mkdir -p $install_path;
setfacl=$(which setfacl)
if [ "$?" -eq 0 ];
then
sudo setfacl -dR -m u:`whoami`:rwx .
fi
sudo_opt=""
read -p "Avez-vous besoin de sudo pour les commandes docker ? [Y,n] : " yn
if [[ $yn =~ ^[Yy]$ ]]
then
sudo_opt="sudo"
fi
cd $install_path;
. $abs_path/install.sh
. $abs_path/childthemeinstall.sh
. $abs_path/docker.sh