diff options
author | Bruno Coudoin <bruno.coudoin@free.fr> | 2009-05-30 21:16:31 (GMT) |
---|---|---|
committer | Bruno Coudoin <bruno.coudoin@free.fr> | 2009-05-30 21:16:31 (GMT) |
commit | 64caddc2f58dee13d03da4a4ea03baaf2e6fe6cd (patch) | |
tree | 2b091a1348439e12d477187fab32a00acbbe91f2 | |
parent | 738295a8e7e9b82579094ea9b9819086da364062 (diff) |
improved the bundling script again.
-rwxr-xr-x | src/bundleall.sh | 6 | ||||
-rwxr-xr-x | 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 |