-
Notifications
You must be signed in to change notification settings - Fork 1
/
install-pilot.sh
42 lines (41 loc) · 1.17 KB
/
install-pilot.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
#!/bin/sh
main() {
TRUST=$1
if [ ! $TRUST ]; then
TRUST="../xoops_trust_path"
fi
mkdir ${TRUST}
if [ -d $TRUST ]; then
curl -kL -o corepack.tar.gz https://github.com/XoopsX/legacy/archive/pilot.tar.gz
PREFIX=`tar ztf corepack.tar.gz | head -1`
tar zxf corepack.tar.gz ${PREFIX}xoops_trust_path
cp -rf ${PREFIX}xoops_trust_path/* ${TRUST}
cp -f ${PREFIX}xoops_trust_path/.* ${TRUST}
rm -rf ${PREFIX}
tar zxf corepack.tar.gz ${PREFIX}html
cp -rf ${PREFIX}html/* ./
cp -f ${PREFIX}html/.* ./
rm -rf ${PREFIX}
rm corepack.tar.gz
if [ -d ${PREFIX} ]; then
perl -e "use File::Path;rmtree(\"${PREFIX}\");"
perl -e "unlink(\"corepack.tar.gz\");"
fi
chmod 606 mainfile.php
chmod 707 uploads
chmod 707 ${TRUST}/cache
chmod 707 ${TRUST}/templates_c
chmod 707 ${TRUST}/uploads
chmod 707 ${TRUST}/uploads/xupdate
chmod 707 ${TRUST}/modules/protector/configs
echo "----------------------------------------"
if [ -d "./install" ]; then
echo "All the processings were completed. Please acsess to your XOOPS site."
else
echo "\nERROR: install directory was not found."
fi
else
echo "\nERROR: \"${TRUST}\" cannot be created."
fi
}
main "<T>"