diff --git a/.gitmodules b/.gitmodules index ff90f39..0a921d8 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,6 @@ [submodule "cmake"] path = cmake/backbone url = git@git.backbone.ws:cmake/backbone.git +[submodule "util/backbone"] + path = util/backbone + url = git@git.backbone.ws:cmake/backbone-utils.git diff --git a/util/backbone b/util/backbone new file mode 160000 index 0000000..aa78f6d --- /dev/null +++ b/util/backbone @@ -0,0 +1 @@ +Subproject commit aa78f6d42c85f7f9a98a1a6273230a9775824fc7 diff --git a/util/update-po.sh b/util/update-po.sh deleted file mode 100755 index 465f724..0000000 --- a/util/update-po.sh +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/sh - -## -# settings -## -PO_DIR_NAME=po -EXE_PATH="`readlink -f $0`" -PRJ_PATH="${EXE_PATH%/*/*}" -C_FILELIST="${PRJ_PATH}/src/*.vala" -UI_FILELIST="${PRJ_PATH}/ui/*.glade" -SOURCE_POT=source.pot -GLADE_POT=glade.pot - -## -# code -## -PROJECT_LOWERCASE_NAME=`grep '\' "$PRJ_PATH"/CMakeLists.txt | sed 's~.*"\(.*\)".*~\1~'` -MAJOR=`grep '\' "$PRJ_PATH"/CMakeLists.txt | sed 's~.*\([0-9]\+\).*~\1~'` -PROJECT_LOWERCASE_NAME_ABI="$PROJECT_LOWERCASE_NAME-$MAJOR" - -xgettext --language=C --escape --package-name=$PROJECT_LOWERCASE_NAME_ABI --default-domain=$PROJECT_LOWERCASE_NAME_ABI --add-comments=/// \ - -k_ -kQ_ -kC_ -kN_ -kNC_ -kg_dgettext -kg_dcgettext \ - -kg_dngettext -kg_dpgettext -kg_dpgettext2 -kg_strip_context -F -n -o \ - $PRJ_PATH/$PO_DIR_NAME/$SOURCE_POT $C_FILELIST - -xgettext --language=C --escape --package-name=$PROJECT_LOWERCASE_NAME_ABI --default-domain=$PROJECT_LOWERCASE_NAME_ABI --add-comments=/// \ - -k_ -kQ_ -kC_ -kN_ -kNC_ -kg_dgettext -kg_dcgettext \ - -kg_dngettext -kg_dpgettext -kg_dpgettext2 -kg_strip_context -F -n -o \ - $PRJ_PATH/$PO_DIR_NAME/$GLADE_POT $C_FILELIST - -msgcat -o $PRJ_PATH/$PO_DIR_NAME/$PROJECT_LOWERCASE_NAME_ABI.pot --use-first $PRJ_PATH/$PO_DIR_NAME/$SOURCE_POT $PRJ_PATH/$PO_DIR_NAME/$GLADE_POT - -rm $PRJ_PATH/$PO_DIR_NAME/$SOURCE_POT -rm $PRJ_PATH/$PO_DIR_NAME/$GLADE_POT - -[ 0 != $? ] && echo "xgettext failed ;-(" && exit 1 -[ ! -e $PRJ_PATH/$PO_DIR_NAME/$PROJECT_LOWERCASE_NAME_ABI.pot ] && echo "No strings found ;-(" && exit 1 - -for d in $PRJ_PATH/$PO_DIR_NAME/*; do - [ ! -d $d ] && continue - - if [ -e $d/$PROJECT_LOWERCASE_NAME_ABI.po ]; then - echo "Merging '${d##*/}' locale" && msgmerge -F -U $d/$PROJECT_LOWERCASE_NAME_ABI.po $PRJ_PATH/$PO_DIR_NAME/$PROJECT_LOWERCASE_NAME_ABI.pot - [ 0 != $? ] && echo "msgmerge failed ;(" && exit 1 - else - echo "Creating '${d##*/}' locale" && msginit -l ${d##*/} -o $d/$PROJECT_LOWERCASE_NAME_ABI.po -i $PRJ_PATH/$PO_DIR_NAME/$PROJECT_LOWERCASE_NAME_ABI.pot - [ 0 != $? ] && echo "msginit failed ;(" && exit 1 - fi - -done diff --git a/util/valadoc.sh b/util/valadoc.sh deleted file mode 100755 index 911f164..0000000 --- a/util/valadoc.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/bash - -## -# settings -## -BROWSER=firefox - -## -# code -## -EXE_PATH="`readlink -f $0`" -PRJ_PATH="${EXE_PATH%/*/*}" -PROJECT_LOWERCASE_NAME=`grep '\' "$PRJ_PATH"/CMakeLists.txt | sed 's~.*"\(.*\)".*~\1~'` - -OUT_PATH="$PRJ_PATH/doc/html/$PROJECT_LOWERCASE_NAME" -OUT_INTERNAL_PATH="$PRJ_PATH/doc/html/$PROJECT_LOWERCASE_NAME-internals" - -VALA_BASEDIR=`grep -v '\.\.' "$PRJ_PATH"/valadoc_env | grep '^BASEDIR=[-+A-Za-z0-9. ]\+$' | cut -d= -f2` -VALA_PKGS=`grep -v '\.\.' "$PRJ_PATH"/valadoc_env | grep '^PKGS=[-+A-Za-z0-9. ]\+$' | cut -d= -f2 | sed 's~\(^\| \)~ --pkg=~g; s~^ ~~'` - -echo "Generating documentation..." -rm -rf "$OUT_PATH" -echo VALA_BASEDIR=$VALA_BASEDIR -echo VALA_PKGS=$VALA_PKGS -valadoc --no-protected -o "$OUT_PATH" -b "$PRJ_PATH/$VALA_BASEDIR" `find "$PRJ_PATH/$VALA_BASEDIR" -name "*.vapi" -or -name "*.vala"` $VALA_PKGS -$BROWSER "$OUT_PATH"/$PROJECT_LOWERCASE_NAME/index.htm &>/dev/null - -#echo "Generating internal documentation..." -#rm -rf "$OUT_INTERNAL_PATH" -#valadoc -o "$OUT_INTERNAL_PATH" -b "$PRJ_PATH/$VALA_BASEDIR" `find "$PRJ_PATH/$VALA_BASEDIR" -name "*.vapi" -or -name "*.vala"` $VALA_PKGS --internal - -#$BROWSER "$OUT_INTERNAL_PATH"/$PROJECT_LOWERCASE_NAME-internals/index.htm &>/dev/null