summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore2
-rwxr-xr-xdist/build_all.sh54
-rwxr-xr-xdist/scripts/po2mo.sh11
-rw-r--r--samplefiles/content/en/start/props.ini2
-rw-r--r--samplefiles/content/fr/accueil/props.ini2
5 files changed, 66 insertions, 5 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..244db3d
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
+dist/work/
+dist/work.old/
diff --git a/dist/build_all.sh b/dist/build_all.sh
index 05a7907..5cdde31 100755
--- a/dist/build_all.sh
+++ b/dist/build_all.sh
@@ -1,2 +1,56 @@
#!/bin/bash
+function export_files() {
+ srcbase=$1
+ dstbase=$2
+ echo "Copying files..."
+ IFS=' '
+ while read src dst
+ do
+ [ -d "$dstbase/$dst" ] || mkdir -p "$dstbase/$dst"
+ cp "$srcbase/$src" "$dstbase/$dst"
+ done
+}
+
+echo "Cleaning up work/ directory..."
+[ -d work.old/ ] && rm -r work.old/
+[ -d work ] && mv work/ work.old/
+mkdir work/
+
+srcbase=".."
+dstbase="work/tarball"
+
+export_files $srcbase $dstbase <<EOT
+./README ./
+./code/index.php ./
+./code/admin/add.php ./admin/
+./code/admin/admin.css ./admin/
+./code/admin/admin.js ./admin/
+./code/admin/ajax.php ./admin/
+./code/admin/auth.php ./admin/
+./code/admin/editor-bind-code.html ./admin/
+./code/admin/index.php ./admin/
+./code/admin/render.php ./admin/
+./code/admin/utils.php ./admin/
+./libs/microajax/microajax.minified.js ./admin/
+./libs/treeview/treeview.css ./admin/
+./libs/treeview/treeview_icons.png ./admin/
+./samplefiles/templates/default/layout-article.php ./admin/templates/default/
+./samplefiles/templates/default/screen.css ./admin/templates/default/
+EOT
+
+scripts/po2mo.sh $srcbase/locale $dstbase/locale
+
+export_files $srcbase $dstbase <<EOT
+./samplefiles/content/en/start/div-content.html ./admin/content/en/start/
+./samplefiles/content/en/start/div-teaser.html ./admin/content/en/start/
+./samplefiles/content/en/start/props.ini ./admin/content/en/start/
+./samplefiles/content/fr/accueil/div-content.html ./admin/content/fr/accueil/
+./samplefiles/content/fr/accueil/div-teaser.html ./admin/content/fr/accueil/
+./samplefiles/content/fr/accueil/props.ini ./admin/content/fr/accueil/
+./samplefiles/content/site_conf.ini ./admin/content/
+./samplefiles/templates/aloha/images/background.png ./admin/templates/aloha/images/
+./samplefiles/templates/aloha/images/external-link-ltr-icon.png ./admin/templates/aloha/images/
+./samplefiles/templates/aloha/layout-article.php ./admin/templates/aloha/
+./samplefiles/templates/aloha/screen.css ./admin/templates/aloha/
+EOT
diff --git a/dist/scripts/po2mo.sh b/dist/scripts/po2mo.sh
index 7be049b..79f344d 100755
--- a/dist/scripts/po2mo.sh
+++ b/dist/scripts/po2mo.sh
@@ -1,9 +1,14 @@
#!/bin/bash
-for f in *.po
+srcbase=$1
+dstbase=$2
+
+echo "Generating locales..."
+for f in $(ls $srcbase/*.po)
do
- mo_dir=${f%%.po}.utf8/LC_MESSAGES/
+ fname=$(basename "$f")
+ mo_dir="$dstbase"/${fname%%.po}.utf8/LC_MESSAGES
[ -d "$mo_dir" ] || mkdir -p "$mo_dir"
- echo msgfmt -o "$mo_dir/editablesite.mo" "$f"
+ #echo msgfmt -o "'$mo_dir/editablesite.mo'" "'$f'"
msgfmt -o "$mo_dir/editablesite.mo" "$f"
done
diff --git a/samplefiles/content/en/start/props.ini b/samplefiles/content/en/start/props.ini
index 63546c0..ecbef19 100644
--- a/samplefiles/content/en/start/props.ini
+++ b/samplefiles/content/en/start/props.ini
@@ -1,4 +1,4 @@
-page_template = default
+page_template = aloha
page_layout = article
page_title = "Aloha, World!"
page_description = "Hello world for the mini site creator tool"
diff --git a/samplefiles/content/fr/accueil/props.ini b/samplefiles/content/fr/accueil/props.ini
index c833c34..dca5173 100644
--- a/samplefiles/content/fr/accueil/props.ini
+++ b/samplefiles/content/fr/accueil/props.ini
@@ -1,4 +1,4 @@
-page_template = default
+page_template = aloha
page_layout = article
page_title = "Démonstration Aloha"
page_description = "Cette page reprends la démonstration de l'éditeur Aloha"