[gcompris/gcomprixo] improved the bundling script again.
- From: Bruno Coudoin <bcoudoin src gnome org>
- To: svn-commits-list gnome org
- Subject: [gcompris/gcomprixo] improved the bundling script again.
- Date: Sat, 30 May 2009 18:54:14 -0400 (EDT)
commit 64caddc2f58dee13d03da4a4ea03baaf2e6fe6cd
Author: Bruno Coudoin <bruno coudoin free fr>
Date: Sat May 30 23:16:31 2009 +0200
improved the bundling script again.
---
src/bundleall.sh | 6 +++---
src/bundleit.sh | 21 +++++++++++++++++----
2 files changed, 20 insertions(+), 7 deletions(-)
diff --git a/src/bundleall.sh b/src/bundleall.sh
index bb4f72e..b376859 100755
--- a/src/bundleall.sh
+++ b/src/bundleall.sh
@@ -1,10 +1,10 @@
for f in *-activity; do ./bundleit.sh $f; done
# These one are localized
-rm click_on_letter.activity.xo
+rm -f click_on_letter.activity.xo
-for gmo in ../po/*.gmo
+for voice in `find ../boards/voices/ -maxdepth 1 -type d | grep -v "/$" | grep -v ".svn"`
do
- lng=`echo $gmo | sed s/.gmo//`
+ lng=`echo $voice | sed s:../boards/voices/::`
./bundleit.sh click_on_letter-activity $lng
done
\ No newline at end of file
diff --git a/src/bundleit.sh b/src/bundleit.sh
index aea6dec..b31331b 100755
--- a/src/bundleit.sh
+++ b/src/bundleit.sh
@@ -28,6 +28,14 @@ WARNING()
echo "${CMAG}$1${CNONE}"
}
+# Sugar cleanup
+cleanup()
+{
+ echo "Cleanup $activity_dir"
+ rm -rf $activity_dir
+ rm -f $activity_dir.tar.bz2
+}
+
lang=
if test -n "$2"; then
lang=$2
@@ -151,7 +159,14 @@ if [ "$lang" != "" -a "$localized" != "" ]; then
up=`dirname $mandatory_sound_dir`
mkdir -p $activity_dir/resources/$up
dotdot=`echo $up | sed s/[^/]*/../g`
- ln -s $dotdot/../../../boards/$mandatory_sound_dir -t $activity_dir/resources/$up
+ if [ -d ../boards/$mandatory_sound_dir ]
+ then
+ ln -s $dotdot/../../../boards/$mandatory_sound_dir -t $activity_dir/resources/$up
+ else
+ echo "ERROR: Resource dir not found: $dotdot/../../../boards/$mandatory_sound_dir"
+ cleanup
+ exit 1
+ fi
fi
# Add the resources if they are in another activity
@@ -211,6 +226,4 @@ fi
rm -f $activity_dir.xo
tar -tjf $activity_dir.tar.bz2 | zip ${activity_dir}${suffix}.xo -@ > /dev/null
-# Sugar cleanup
-rm -rf $activity_dir
-rm $activity_dir.tar.bz2
+cleanup
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]