forked from asb/spindle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwheezy-stage4-lxde-edu
executable file
·69 lines (58 loc) · 1.78 KB
/
wheezy-stage4-lxde-edu
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
#!/bin/sh
# Part of spindle http://asbradbury.org/projects/spindle
#
# See LICENSE file for copyright and license details
set -ex
WORKDIR=work
OUTDIR=out
CURIMG=stage4-lxde-edu.qed
. ./common
install_packages() {
ssh_in_to_qemu chroot /mnt sh -l -ex - <<EOF
apt-get update
apt-get install -y python idle python-pygame python-tk
apt-get install -y python3 idle3 python3-tk
EOF
}
install_scratch() {
download_if_necessary http://asbradbury.org/tmp/raspi/scratch/scratch_1.4.0.1-0miry3_all.deb &&
scp_in_to_qemu scratch_*.deb /mnt/root &&
download_if_necessary http://asbradbury.org/tmp/raspi/scratch/scratch-plugins_1.4.0.1-0miry3_armel.deb &&
scp_in_to_qemu scratch-plugins*.deb /mnt/root &&
# see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=471927, scratch is
# currently incompatible with wheezy's squeak-vm
download_if_necessary http://ftp.uk.debian.org/debian/pool/main/s/squeak-vm/squeak-vm_4.0.3.2202-2_armel.deb &&
scp_in_to_qemu squeak-vm*.deb /mnt/root &&
onvm_chroot sh -l -e <<\EOF
cd /root
dpkg -i squeak*.deb || true
apt-get install -f -y
rm squeak*.deb
# now pin the squeak-vm version
cat <<PINEOF > /etc/apt/preferences.d/squeakpin
Package: squeak-vm
Pin: version 1:4.0*
Pin-Priority: 1001
PINEOF
apt-cache policy squeak-vm # check the pin
# now install scratch and scratch plugins
dpkg -i scratch-plugins*.deb || true
apt-get install -f -y
rm scratch-plugins*.deb
dpkg -i scratch_*.deb || true
apt-get install -f -y
rm scratch_*.deb
EOF
}
cd $WORKDIR
dotask branch_image ../$OUTDIR/stage4-lxde.qed $CURIMG
dotask run_qemu $CURIMG
dotask disable_starting_services
dotask mount_apt_cache
dotask install_packages
dotask install_scratch
dotask save_space_using_hardlink
dotask allow_starting_services
dotask fingerprint_debian
dotask shutdown_qemu
dotask finish_image