Commit 225adc6c authored by Bruno Coudoin's avatar Bruno Coudoin

Created a new script utility. It create a new empty activity with

the given name (only python activity).
parent 02429b75
#set -x
if [ -z $1 ]; then
echo "Usage: [new GCompris activity]"
echo " e.g.: myactivity"
exit 1
path=`dirname $0`
cp -r $templatedir $activitydir
cp newactivity.svg $activitydir/$activity.svg
cd $activitydir
# Cleanup, remove generated files
rm -f Makefile pythontemplate.pyc pythontemplate.xml \
Makefile python.svg
mv $ $
mv $ $
sed -i s/$template/$activity/g \
$ $
sed -i s/python.svg/$activity.svg/ $
sed -i "s:Bruno Coudoin:your name here:" $
sed -i "s:\\(<_title>.*</_title>\\):<_title>set a title for $activity</_title>:" $
sed -i "s:\\(<_description>.*</_description>\\):<_description>set a description for $activity</_description>:" $
sed -i "s:\\(<_prerequisite>.*</_prerequisite>\\):<_prerequisite>set a prerequisite for $activity</_prerequisite>:" $
sed -i "s:\\(<_goal>.*</_goal>\\):<_goal>set a goal for $activity</_goal>:" $
sed -i "s:\\(<_manual>.*</_manual>\\):<_manual>set a manual for $activity</_manual>:" $
sed -i "s:\\(<_credit>.*</_credit>\\):<_credit>set a credit for $activity</_credit>:" $
cd -
# Now add the activity to our compilation chain
sed -i "s:\\(AC_OUTPUT.*\\):\\1 src/$activitydir/Makefile:" ../
sed -i "s:SUBDIRS = :SUBDIRS = $activitydir :"
echo src/$activitydir/$ >> ../po/
echo src/$activitydir/$ >> ../po/
echo "Now you can test your activity with:"
echo "make && ./runit $activitydir"
echo "To run it in a complete GCompris, run:"
echo "sudo make install"
echo "gcompris --experimental"
echo "(by default the activity is in the experimental section."
echo " To change is, edit the file $activitydir/$"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment