Subversion Repositories cryptochat

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 daniel-mar 1
#!/bin/bash
2
 
3
DIR=$( dirname "$0" )
4
 
5
if [ ! -d "$DIR"/chats ]; then
6
        mkdir "$DIR"/chats
7
 
8
        # TODO: is 1777 ok?
9
        chmod 1777 "$DIR"/chats
10
fi
11
 
12
if [ ! -f "$DIR"/chats/.htaccess ]; then
13
        (
14
                echo "Order Deny,Allow"
15
                echo "Deny From All"
16
        ) > "$DIR"/chats/.htaccess
17
fi
18
 
19
if [ ! -d "$DIR"/dependencies ]; then
20
        mkdir "$DIR"/dependencies
21
        cd "$DIR"/dependencies
22
 
23
        wget http://www.boutell.com/scripts/jsonwrapper.tar.gz
24
        tar -zxvf jsonwrapper.tar.gz
25
        rm jsonwrapper.tar.gz
26
 
27
        wget https://crypto-js.googlecode.com/files/CryptoJS%20v3.1.2.zip
28
        mkdir cryptojs
29
        unzip -d cryptojs/ "CryptoJS v3.1.2.zip"
30
        rm "CryptoJS v3.1.2.zip"
31
 
32
        wget https://github.com/AJenbo/Sajax/archive/master.zip
33
        unzip master.zip
34
        rm master.zip
35
        mv Sajax-master sajax
36
 
37
        mkdir crc32-js-php
38
        cd crc32-js-php
39
        wget https://raw.github.com/wbond/crc32-js-php/master/crc32.js
40
fi
41
 
42
if [ ! -f "$DIR"/config/config.inc.php ]; then
43
        cp "$DIR"/config/config.original.inc.php "$DIR"/config/config.inc.php
44
        nano "$DIR"/config/config.inc.php
45
fi