WebsiteTools 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/dyn-site.sh +98 -98
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d053ef4e20cb889ab15ee7f4dea7f890cc6415fb
|
4
|
+
data.tar.gz: a83f8efe4f621ddb29387fd33556b49b70d6736d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 30042e69a7f8ad742919f8e96c10954bae6b669eb90e1ecc6a78838b15dbd419f4c033a14bd340977956919435f5b9d8d88c54c6647ed617ed5104e73b68f526
|
7
|
+
data.tar.gz: e099e953e79fbc394596c47638f674eb7554a4220b6045f39a3753321f8a067a2ec03c7895aae9f1f5aa668199a4cfa0ea7b80629177f7629f342eb53d79f1d1
|
data/bin/dyn-site.sh
CHANGED
@@ -20,108 +20,108 @@ fi
|
|
20
20
|
|
21
21
|
case $Cmd in
|
22
22
|
help)
|
23
|
-
echo "Aide:"
|
24
|
-
echo "----"
|
25
|
-
echo " dyn-site first (création de l'arborescence de base)"
|
26
|
-
echo " dyn-site init (installation de tools et system)"
|
27
|
-
echo " dyn-site add <User> (ajout d'un utilisateur <User>)"
|
28
|
-
echo " dyn-site rebase <Conf> (cas de workshop où <Conf>=<User>)"
|
29
|
-
echo " dyn-site rebase-subdir <Subdir> <Prj> (Subdir=<User>/<PrjPath>)"
|
30
|
-
;;
|
23
|
+
echo "Aide:"
|
24
|
+
echo "----"
|
25
|
+
echo " dyn-site first (création de l'arborescence de base)"
|
26
|
+
echo " dyn-site init (installation de tools et system)"
|
27
|
+
echo " dyn-site add <User> (ajout d'un utilisateur <User>)"
|
28
|
+
echo " dyn-site rebase <Conf> (cas de workshop où <Conf>=<User>)"
|
29
|
+
echo " dyn-site rebase-subdir <Subdir> <Prj> (Subdir=<User>/<PrjPath>)"
|
30
|
+
;;
|
31
31
|
first)
|
32
|
-
## Not necessary for docker
|
33
|
-
mkdir -p $RootSrv/edit
|
34
|
-
mkdir -p $RootSrv/public/users
|
35
|
-
;;
|
32
|
+
## Not necessary for docker
|
33
|
+
mkdir -p $RootSrv/edit
|
34
|
+
mkdir -p $RootSrv/public/users
|
35
|
+
;;
|
36
36
|
init)
|
37
|
-
# get RodaWebUser from environment variable
|
38
|
-
## Install Specfic stuff inside
|
39
|
-
mkdir -p $RootSrv/install/RodaSrvTools
|
40
|
-
cd ${RootSrv}/install
|
41
|
-
if ! [ -d DynRodaSystem ]; then git clone https://toltex-gogs.u-ga.fr/rcqls/DynRodaSystem.git; fi
|
42
|
-
if ! [ -f RodaSrvTools.zip ]; then
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
fi
|
47
|
-
## Create links
|
48
|
-
cd ${RootSrv}
|
49
|
-
ln -sf install/DynRodaSystem system
|
50
|
-
cd public
|
51
|
-
ln -sf ../install/RodaSrvTools tools
|
52
|
-
## Config file
|
53
|
-
echo "---" > $HOME/dyndoc/etc/dyn-html.yml
|
54
|
-
echo "root: $HOME/RodaSrv" >> $HOME/dyndoc/etc/dyn-html.yml
|
55
|
-
;;
|
37
|
+
# get RodaWebUser from environment variable
|
38
|
+
## Install Specfic stuff inside
|
39
|
+
mkdir -p $RootSrv/install/RodaSrvTools
|
40
|
+
cd ${RootSrv}/install
|
41
|
+
if ! [ -d DynRodaSystem ]; then git clone https://toltex-gogs.u-ga.fr/rcqls/DynRodaSystem.git; fi
|
42
|
+
if ! [ -f RodaSrvTools.zip ]; then
|
43
|
+
wget https://toltex-seafile.u-ga.fr/f/128ced4435/?raw=1 -O RodaSrvTools.zip
|
44
|
+
cd RodaSrvTools
|
45
|
+
unzip ../RodaSrvTools.zip
|
46
|
+
fi
|
47
|
+
## Create links
|
48
|
+
cd ${RootSrv}
|
49
|
+
ln -sf install/DynRodaSystem system
|
50
|
+
cd public
|
51
|
+
ln -sf ../install/RodaSrvTools tools
|
52
|
+
## Config file
|
53
|
+
echo "---" > $HOME/dyndoc/etc/dyn-html.yml
|
54
|
+
echo "root: $HOME/RodaSrv" >> $HOME/dyndoc/etc/dyn-html.yml
|
55
|
+
;;
|
56
56
|
add)
|
57
|
-
# get RodaWebUser from environment variable
|
58
|
-
RodaWebUser=$2
|
59
|
-
if [ "$RodaWebUser" != "" ]; then
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
fi
|
66
|
-
;;
|
57
|
+
# get RodaWebUser from environment variable
|
58
|
+
RodaWebUser=$2
|
59
|
+
if [ "$RodaWebUser" != "" ]; then
|
60
|
+
mkdir -p ${RootSrv}/edit/${RodaWebUser}
|
61
|
+
mkdir -p ${RootSrv}/public/pages
|
62
|
+
mkdir -p ${RootSrv}/public/users/${RodaWebUser}/pages/${RodaWebUser}
|
63
|
+
cd ${RootSrv}/public/pages
|
64
|
+
ln -s ../users/${RodaWebUser}/pages/${RodaWebUser} ${RodaWebUser}
|
65
|
+
fi
|
66
|
+
;;
|
67
67
|
rebase)
|
68
|
-
Conf=$2
|
69
|
-
if [ "${Conf}" = "" ]; then
|
70
|
-
|
71
|
-
fi
|
72
|
-
PUBLIC_ROOT="$HOME/RodaSrv/public/users/${Conf}"
|
73
|
-
SITE_ROOT="$HOME/RodaSrv/.site/$Conf"
|
74
|
-
PAGES_ROOT="$SITE_ROOT/pages"
|
75
|
-
mkdir -p ${SITE_ROOT}
|
76
|
-
cp -R ${PUBLIC_ROOT}/* ${SITE_ROOT}/
|
77
|
-
cd ${PAGES_ROOT}
|
78
|
-
pages=$(ls *.html)
|
79
|
-
echo "pages to process: $pages"
|
80
|
-
for html in $pages
|
81
|
-
do
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
done
|
86
|
-
cd $SITE_ROOT
|
87
|
-
rm -fr pages
|
88
|
-
;;
|
68
|
+
Conf=$2
|
69
|
+
if [ "${Conf}" = "" ]; then
|
70
|
+
exit
|
71
|
+
fi
|
72
|
+
PUBLIC_ROOT="$HOME/RodaSrv/public/users/${Conf}"
|
73
|
+
SITE_ROOT="$HOME/RodaSrv/.site/$Conf"
|
74
|
+
PAGES_ROOT="$SITE_ROOT/pages"
|
75
|
+
mkdir -p ${SITE_ROOT}
|
76
|
+
cp -R ${PUBLIC_ROOT}/* ${SITE_ROOT}/
|
77
|
+
cd ${PAGES_ROOT}
|
78
|
+
pages=$(ls *.html)
|
79
|
+
echo "pages to process: $pages"
|
80
|
+
for html in $pages
|
81
|
+
do
|
82
|
+
rebase_url --from /users/$Conf/ --to / $html
|
83
|
+
rebase_url --from /$Conf/ --to / $html
|
84
|
+
mv $html ..
|
85
|
+
done
|
86
|
+
cd $SITE_ROOT
|
87
|
+
rm -fr pages
|
88
|
+
;;
|
89
89
|
rebase-subdir)
|
90
|
-
Subdir=$2
|
91
|
-
if [ "${Subdir}" = "" ]; then
|
92
|
-
|
93
|
-
|
94
|
-
fi
|
95
|
-
Prj=$3
|
96
|
-
if [ "${Prj}" = "" ]; then
|
97
|
-
|
98
|
-
|
99
|
-
fi
|
100
|
-
PUBLIC_ASSETS="$HOME/RodaSrv/public/users/${Subdir}/${Prj}"
|
101
|
-
PUBLIC_PAGES="$HOME/RodaSrv/public/pages/${Subdir}/${Prj}"
|
102
|
-
SITE_ROOT="$HOME/RodaSrv/.site/$Prj"
|
103
|
-
PAGES_ROOT="$SITE_ROOT/pages"
|
104
|
-
mkdir -p ${PAGES_ROOT}
|
105
|
-
cp ${PUBLIC_PAGES}/* ${PAGES_ROOT}/
|
106
|
-
cp -R ${PUBLIC_ASSETS}/* ${SITE_ROOT}/
|
107
|
-
cd ${PAGES_ROOT}
|
108
|
-
pages=$(
|
109
|
-
echo "pages to process: $pages"
|
110
|
-
for html in $pages
|
111
|
-
do
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
rm -fr pages
|
118
|
-
;;
|
90
|
+
Subdir=$2
|
91
|
+
if [ "${Subdir}" = "" ]; then
|
92
|
+
echo "Subdir doit être non vide!"
|
93
|
+
exit
|
94
|
+
fi
|
95
|
+
Prj=$3
|
96
|
+
if [ "${Prj}" = "" ]; then
|
97
|
+
echo "Prj doit être non vide!"
|
98
|
+
exit
|
99
|
+
fi
|
100
|
+
PUBLIC_ASSETS="$HOME/RodaSrv/public/users/${Subdir}/${Prj}"
|
101
|
+
PUBLIC_PAGES="$HOME/RodaSrv/public/pages/${Subdir}/${Prj}"
|
102
|
+
SITE_ROOT="$HOME/RodaSrv/.site/$Prj"
|
103
|
+
PAGES_ROOT="$SITE_ROOT/pages"
|
104
|
+
mkdir -p ${PAGES_ROOT}
|
105
|
+
cp -R ${PUBLIC_PAGES}/* ${PAGES_ROOT}/
|
106
|
+
cp -R ${PUBLIC_ASSETS}/* ${SITE_ROOT}/
|
107
|
+
cd ${PAGES_ROOT}
|
108
|
+
pages=$(find . -name '*.html')
|
109
|
+
echo "pages to process: $pages"
|
110
|
+
for html in $pages
|
111
|
+
do
|
112
|
+
rebase_url --from /users/${Subdir}/${Prj}/ --to / $html
|
113
|
+
rebase_url --from /${Subdir}/${Prj}/ --to / $html
|
114
|
+
done
|
115
|
+
cd $SITE_ROOT
|
116
|
+
mv pages/* .
|
117
|
+
rm -fr pages
|
118
|
+
;;
|
119
119
|
deploy)
|
120
|
-
Conf=$2
|
121
|
-
url="sfdsmqrk@ftp.sfds.asso.fr:$Conf/"
|
122
|
-
if [ "$3" != "" ]; then
|
123
|
-
|
124
|
-
fi
|
125
|
-
rsync -az $SITE_ROOT/* $url
|
126
|
-
;;
|
120
|
+
Conf=$2
|
121
|
+
url="sfdsmqrk@ftp.sfds.asso.fr:$Conf/"
|
122
|
+
if [ "$3" != "" ]; then
|
123
|
+
url="$3"
|
124
|
+
fi
|
125
|
+
rsync -az $SITE_ROOT/* $url
|
126
|
+
;;
|
127
127
|
esac
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: WebsiteTools
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- CQLS
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-11-21 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: " Tools for Website.\n"
|
14
14
|
email: rdrouilh@gmail.com
|