-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure
executable file
·38 lines (29 loc) · 1.45 KB
/
configure
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
#!/bin/bash
# Internal use. Just to symlink files to a test site
# Need fist that extension already beem installed, so will remove
# files and folders and just create symbolic links to repository
if [ ! -d "/alligo/code/" ]; then
# Este script nao deveria estar sendo executado. Você por acaso fez
# upload da pasta inteira?
exit
fi
REPOSITORIO=/alligo/code/alligo/joomla_mod_varnish_purge # Onde está o repositorio?
WEBPATH=/alligo/web/_/joomla-testing/joomla35rc-c/administrator # Onde está o site de de testes
EXTNAME=mod_varnish_purge
# Apaga repositorios e links
if [[ -d $WEBPATH"/modules/"$EXTNAME"/" && ! -L $WEBPATH"/modules/"$EXTNAME"/" ]]; then
echo "Link to $REPOSITORIO"
rm -rf $WEBPATH"/modules/"$EXTNAME"/"
ln -s $REPOSITORIO $WEBPATH"/modules/"$EXTNAME # Repare a falta de / ao final
fi
if [ -f $WEBPATH"/language/en-GB/en-GB."$EXTNAME".ini" ]; then
echo "Link $EXTNAME lang"
rm -f $WEBPATH"/language/en-GB/en-GB."$EXTNAME".ini"
ln -s $REPOSITORIO"/language/en-GB/en-GB."$EXTNAME".ini" $WEBPATH"/language/en-GB/en-GB."$EXTNAME".ini"
fi
if [ -f $WEBPATH"/language/en-GB/en-GB."$EXTNAME".sys.ini" ]; then
echo "Link $EXTNAME lang"
rm -f $WEBPATH"/language/en-GB/en-GB."$EXTNAME".sys.ini"
ln -s $REPOSITORIO"/language/en-GB/en-GB."$EXTNAME".sys.ini" $WEBPATH"/language/en-GB/en-GB."$EXTNAME".sys.ini"
fi
#ln -s /alligo/code/alligo/mod_banners4varnish/media/ /alligo/web/_/joomla34/media/alligo