blob: 60d7e8353b3c98567f050d3d52fa2bb648a63b75 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
|
%post --nochroot
# activities.sugarlabs.org (ASLO) installed-packages
# Fructose
ASLO="$ASLO org.laptop.WebActivity"
ASLO="$ASLO org.laptop.TurtleArtActivity"
ASLO="$ASLO org.laptop.sugar.ReadActivity"
ASLO="$ASLO org.laptop.ImageViewerActivity"
ASLO="$ASLO org.laptop.Pippy"
ASLO="$ASLO org.laptop.Terminal"
ASLO="$ASLO org.laptop.sugar.Jukebox"
ASLO="$ASLO org.laptop.Log"
ASLO="$ASLO org.laptop.Chat"
ASLO="$ASLO org.laptop.Calculate"
ASLO="$ASLO org.laptop.AbiWordActivity"
# Honey subset
ASLO="$ASLO org.laptop.community.TypingTurtle"
ASLO="$ASLO org.sugarlabs.IRC"
ASLO="$ASLO com.garycmartin.Moon"
ASLO="$ASLO org.laptop.sugar.ReadEtextsActivity"
ASLO="$ASLO com.ywwg.CartoonBuilderActivity"
ASLO="$ASLO vu.lux.olpc.Speak"
ASLO="$ASLO org.laptop.ViewSlidesActivity"
ASLO="$ASLO org.sugarlabs.InfoSlicer"
ASLO="$ASLO org.worldwideworkshop.olpc.FlipSticks"
ASLO="$ASLO org.worldwideworkshop.olpc.JigsawPuzzle"
ASLO="$ASLO org.worldwideworkshop.olpc.SliderPuzzle"
ASLO="$ASLO org.laptop.community.Colors"
ASLO="$ASLO org.squeak.FreeCell"
ASLO="$ASLO org.laptop.TamTamEdit"
ASLO="$ASLO org.laptop.TamTamJam"
ASLO="$ASLO org.laptop.TamTamMini"
ASLO="$ASLO org.laptop.TamTamSynthLab"
ASLO="$ASLO org.laptop.Memorize"
ASLO="$ASLO org.worldwideworkshop.JokeMachineActivity"
ASLO="$ASLO vu.lux.olpc.Maze"
ASLO="$ASLO org.worldwideworkshop.olpc.storybuilder"
ASLO="$ASLO org.worldwideworkshop.PollBuilder"
ASLO="$ASLO org.gnome.Labyrinth"
ASLO="$ASLO org.laptop.RecordActivity"
ASLO="$ASLO org.laptop.Oficina"
ASLO="$ASLO tv.alterna.Clock"
ASLO="$ASLO org.laptop.physics"
ASLO="$ASLO org.laptop.sugar.GetIABooksActivity"
ASLO="$ASLO org.laptop.Arithmetic"
ASLO="$ASLO org.laptop.community.FoodForce2"
ASLO="$ASLO org.sugarlabs.SlideruleActivity"
ASLO="$ASLO com.socialtext.SocialCalcActivity"
ASLO="$ASLO org.sugarlabs.VisualMatchActivity"
ASLO="$ASLO edu.mit.media.ScratchActivity"
WD=$PWD
BUNDLES_DIR=$INSTALL_ROOT/usr/share/sugar/bundles
mkdir -p $BUNDLES_DIR
cd $BUNDLES_DIR
CACHE_DIR=$WD/../cache/aslo
mkdir -p $CACHE_DIR
ASLO_SP='0.86'
ASLO_URL='http://activities.sugarlabs.org/services/update-aslo.php'
ASLO_LINK='.//{http://www.mozilla.org/2004/em-rdf#}updateLink'
for bundle_id in $ASLO ; do
curl -4 -s -L "$ASLO_URL?id=$bundle_id&appVersion=$ASLO_SP" > $CACHE_DIR/metadata
url=$(python -c "from xml.etree.ElementTree import parse; url=parse('$CACHE_DIR/metadata').find('$ASLO_LINK'); print url is not None and url.text or ''")
if [ -z "$url" ]; then
echo "Can not find url for $bundle_id" >&2
continue
fi
remote_file=$(basename $(curl -4 -s -L -w %{url_effective} -I $url | tail -1))
bundle=$CACHE_DIR/$remote_file
if [ ! -f $bundle ] ; then
curl -4 -L $url > $bundle
fi
cp -p $bundle $BUNDLES_DIR
done
# pull sample content for the journal
PDFS="$PDFS africa.pdf"
PDFS="$PDFS asia.pdf"
PDFS="$PDFS central_america.pdf"
PDFS="$PDFS europe.pdf"
PDFS="$PDFS middle_east.pdf"
PDFS="$PDFS north_america.pdf"
PDFS="$PDFS oceania.pdf"
PDFS="$PDFS south_america.pdf"
PDFS="$PDFS southeast_asia.pdf"
for pdf in $PDFS ; do
url=http://dev.sugarlabs.org/raw-attachment/ticket/840/$pdf
remote_file=$(basename $(curl -4 -s -L -w %{url_effective} -I $url | tail -1))
bundle=$CACHE_DIR/$remote_file
if [ ! -f $bundle ] ; then
curl -s -4 -L $url > $bundle
fi
cp -p $bundle $BUNDLES_DIR
done
# get the script to install the activities
cp -p $WD/../install-activity.py .
chmod a+x ./install-activity.py
# get sample content setup script directly from git
cp -p $WD/../copy-to-datastore.py .
chmod a+x ./copy-to-datastore.py
# FIXME: this should be the same uid as CREATE_USERNAME *in the chroot*,
# but is hardcoded here for simplicity
chown -R 500:500 $BUNDLES_DIR
cd $WD
%end
|