-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathredeploy-content.sh
executable file
·32 lines (29 loc) · 1.08 KB
/
redeploy-content.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
#!/bin/sh
# uninstall anything existing
# we do this twice because some things don't resolve the first time
# cloudcms uninstall
cloudcms uninstall
count=0
rm custom/build/missingAttachmentsList.json
rm custom/build/attachmentsList.json
#for dir in custom/docs/import/CloudCMS\ database\ 10*/
for dir in custom/docs/import/CloudCMS\ database*/
do
dir=${dir%*/}
echo "*******************************"
echo "** ${dir} "
echo "*******************************"
count=`expr $count + 1`
cd custom
node ./import.js -t schn:article -f "../${dir}" -n ./docs/import/attachments/unzipped -m /Articles -k ./build
cd ..
echo "*******************************"
echo "** create package schn-import-batch-${count}"
cloudcms package schn-import-batch-${count} app 1
echo "*******************************"
echo "** upload package schn-import-batch-${count}"
cloudcms upload schn-import-batch-${count} app 1
echo "*******************************"
echo "** import package schn-import-batch-${count}"
cloudcms import schn-import-batch-${count} app 1
done