initial version of extra media installer script
[fsf-member-card-builder.git] / install-extras.sh
CommitLineData
1da0abae
AE
1#!/bin/bash
2#
3# Copyright (C) 2012-2020 Ruben Rodriguez <ruben@trisquel.info>
4# Copyright (C) 2020 Andrew Engelbrecht <andrew@fsf.org>
5#
6# This program is free software; you can redistribute it and/or modify
7# it under the terms of the GNU General Public License as published by
8# the Free Software Foundation; either version 2 of the License, or
9# (at your option) any later version.
10#
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14# GNU General Public License for more details.
15#
16# You should have received a copy of the GNU General Public License
17# along with this program; if not, write to the Free Software
18# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19#
20
21set -e
22
23usage(){
24echo
25echo You need to run this script as root
26echo Usage: sudo $0 sources.iso /dev/sdX
27echo Example: sudo $0 trisquel_9.0fsf_sources.iso /dev/sdb
28echo
29echo WARNING!: This script can bite your dog. Use it with care, backup your data.
30echo
31exit 1
32}
33
34[ $(id -u) != 0 ] && usage
35[ $# != 2 ] && usage
36
37ISO=$1
38DEV=$2
39
40ISOTMP=$(mktemp -d)
41DEVTMP=$(mktemp -d)
42
43mount -o loop $ISO $ISOTMP
44mount ${DEV}1 $DEVTMP
45
46
47###
48### copy over checksum files
49###
50
51
52mkdir -p $DEVTMP/fsf/GNUAV/
53mkdir -p $DEVTMP/source/
54
55cp checksums-media.sha256 $DEVTMP/fsf/GNUAV/
56cp checksums-media.sha256 $DEVTMP/source/
57
58
59###
60### download missing media from the Web
61###
62
63cd $DEVTMP/fsf/GNUAV
64
65mkdir lp2020_audio ; cd lp2020_audio
66
67wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2414/freedomsun1525.ogg'
68wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2413/freedomsun1135.ogg'
69wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2412/grandsat1730.ogg'
70wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2411/grandsun0945.ogg'
71wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2410/grandsat0945.ogg'
72
73wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2409/freedomsun1335.ogg'
74wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2408/patriotsun1135.ogg'
75wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2407/grandsat1620.ogg'
76wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2406/patriotsat1335.ogg'
77wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2405/freedomsat1040.ogg'
78
79wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2404/patriotsun1620.ogg'
80wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2403/grandsun1620.ogg'
81wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2402/patriotsun1525.ogg'
82wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2401/grandsun1525.ogg'
83wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2400/patriotsun1430.ogg'
84
85wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2399/freedomsun1430.ogg'
86wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2398/grandsun1430.ogg'
87wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2397/patriotsun1335.ogg'
88wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2396/patriotsun1040.ogg'
89wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2395/freedomsun1040.ogg'
90
91wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2394/freedomsat1525.ogg'
92wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2393/grandsat1525.ogg'
93wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2392/freedomsat1430.ogg'
94wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2391/patriotsat1135.ogg'
95wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2390/grandsat1135.ogg'
96
97wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2389/patriotsat1040.ogg'
98wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2388/grandsat1335.ogg'
99wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2387/grandsat1430.ogg'
100wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2386/patriotsat1430.ogg'
101wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2385/freedomsat1335.ogg'
102
103wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2384/grandsun1715.ogg'
104
105cd ..
106
107
108mv snowden-final.webm lp2016_snowden.webm
109
110wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2070/FSFKeynotewithSlidesHighRes.ogg'
111
112wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2335/grandsun1715.webm' -O lp2020_kahle.webm
113wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2332/grandsat0945.webm' -O lp2020_younghackers.webm
114
115
116###
117### copy over Trisquel 9 sources
118###
119
120
121cp -vr $ISOTMP/* $DEVTMP/source/ || true
122
123
124###
125### clean up
126###
127
128
129umount $DEVTMP
130umount $ISOTMP
131
132rmdir $DEVTMP
133rmdir $ISOTMP
134
135sync
136