[gcompris] tool, improved the bundleit script to support several activities.
- From: Bruno Coudoin <bcoudoin src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gcompris] tool, improved the bundleit script to support several activities.
- Date: Tue, 28 Aug 2012 00:51:24 +0000 (UTC)
commit b80e555afecb569fbac79591caf28d5a922d164d
Author: Bruno Coudoin <bruno coudoin free fr>
Date: Tue Aug 28 02:50:26 2012 +0200
tool, improved the bundleit script to support several activities.
src/bundleit.sh | 29 ++++++++++++++++++++++++-----
1 files changed, 24 insertions(+), 5 deletions(-)
---
diff --git a/src/bundleit.sh b/src/bundleit.sh
index 06b2a6c..fd1392d 100755
--- a/src/bundleit.sh
+++ b/src/bundleit.sh
@@ -1,20 +1,39 @@
#!/bin/bash
#set -x
if [ -z $1 ]; then
- echo "Usage: bundleitit.sh [GCompris activity directory]"
+ echo "Usage: bundleit.sh [one or more GCompris activity directory]"
exit 1
fi
activity=${1%/}
tmpdir=`mktemp -d`
+echo "Temporary directory: $tmpdir"
-cd $activity
-make install DESTDIR=$tmpdir
-cd ..
+for var in "$@"
+do
+ activ=${var%/}
+ echo "Processing $activ"
+ cd $activ
+ if [ $? -ne 0 ]
+ then
+ echo "ERROR: $activ directory not found"
+ rm -rf $tmpdir
+ exit 1
+ fi
+ make -s install DESTDIR=$tmpdir
+ if [ $? -ne 0 ]
+ then
+ echo "ERROR: Make failed"
+ rm -rf $tmpdir
+ exit 1
+ fi
+ cd ..
+done
+echo "Creating $activity.tgz"
tar -czf $activity.tgz -C $tmpdir/usr/local/share/gcompris/ boards python
rm -rf $tmpdir
-echo "The bundle is created in $activity.tgz"
\ No newline at end of file
+echo "The bundle is created in $activity.tgz"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]