-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall
45 lines (34 loc) · 894 Bytes
/
install
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
44
45
#!/bin/bash
# clone
git clone https://github.com/Ensambler/[nombre repositorio]
cd [nombre repositorio]
# hooks
cp .git-hooks/* .git/hooks
chmod +x .git/hooks/pre-commit
chmod +x .git/hooks/post-merge
chmod +x .git/hooks/post-checkout
# command tools
cp .functions ~/.functions
chmod +x ~/.functions
case "$(uname -s)" in
Darwin )
prompt_bashfile=".bash_profile"
;;
Linux )
prompt_bashfile=".bashrc"
;;
esac
if [ ! -z "$ZSH_VERSION" ]; then
prompt_bashfile=".zshrc"
fi
in_bash=`cat ~/$prompt_bashfile | grep "source ~/.functions"`
if [[ -z "$in_bash" ]]; then
echo "source ~/.functions" >> ~/$prompt_bashfile
fi
source ~/$prompt_bashfile
# services
docker-compose up -d
docker-compose down
docker-compose up -d
cat mysql.sql | docker exec -i [nombre contenedor bd] /usr/bin/mysql -u wordpress --password=wordpress wordpress
echo "Done. URL: http://127.0.0.1:[puerto wp]"