a3c9182b8b9754f285fb658f361d8ee0398e0863
[fsf-member-card-builder.git] / install-extras.sh
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
21 set -e
22
23 usage(){
24 echo
25 echo You need to run this script as root
26 echo Usage: sudo $0 sources.iso /dev/sdX
27 echo Example: sudo $0 trisquel_9.0fsf_sources.iso /dev/sdb
28 echo
29 echo WARNING!: This script can bite your dog. Use it with care, backup your data.
30 echo
31 exit 1
32 }
33
34 [ $(id -u) != 0 ] && usage
35 [ $# != 2 ] && usage
36
37 ISO=$1
38 DEV=$2
39
40 ISOTMP=$(mktemp -d)
41 DEVTMP=$(mktemp -d)
42
43 mount -o loop $ISO $ISOTMP
44 mount ${DEV}1 $DEVTMP
45
46
47 ###
48 ### copy over checksum files
49 ###
50
51
52 mkdir -p $DEVTMP/fsf/GNUAV/
53 mkdir -p $DEVTMP/source/
54
55 cp checksums-media.sha256 $DEVTMP/fsf/GNUAV/
56 cp checksums.sha256 $DEVTMP/source/
57
58
59 ###
60 ### copy over html files
61 ###
62
63
64 cp html/* $DEVTMP/fsf/
65 rm $DEVTMP/fsf/reset.css
66
67
68 ###
69 ### download missing media from the Web
70 ###
71
72
73 cd $DEVTMP/fsf/GNUAV
74
75 mkdir lp2020_audio ; cd lp2020_audio
76
77 wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2414/freedomsun1525.ogg'
78 wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2413/freedomsun1135.ogg'
79 wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2412/grandsat1730.ogg'
80 wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2411/grandsun0945.ogg'
81 wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2410/grandsat0945.ogg'
82
83 wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2409/freedomsun1335.ogg'
84 wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2408/patriotsun1135.ogg'
85 wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2407/grandsat1620.ogg'
86 wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2406/patriotsat1335.ogg'
87 wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2405/freedomsat1040.ogg'
88
89 wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2404/patriotsun1620.ogg'
90 wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2403/grandsun1620.ogg'
91 wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2402/patriotsun1525.ogg'
92 wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2401/grandsun1525.ogg'
93 wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2400/patriotsun1430.ogg'
94
95 wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2399/freedomsun1430.ogg'
96 wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2398/grandsun1430.ogg'
97 wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2397/patriotsun1335.ogg'
98 wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2396/patriotsun1040.ogg'
99 wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2395/freedomsun1040.ogg'
100
101 wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2394/freedomsat1525.ogg'
102 wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2393/grandsat1525.ogg'
103 wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2392/freedomsat1430.ogg'
104 wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2391/patriotsat1135.ogg'
105 wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2390/grandsat1135.ogg'
106
107 wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2389/patriotsat1040.ogg'
108 wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2388/grandsat1335.ogg'
109 wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2387/grandsat1430.ogg'
110 wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2386/patriotsat1430.ogg'
111 wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2385/freedomsat1335.ogg'
112
113 wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2384/grandsun1715.ogg'
114
115 cd ..
116
117
118 ##
119 ## These are distributed in trisquel_9.0-fsf_i686.iso. See README.md for details
120 ##
121 #wget 'https://media.libreplanet.org/mgoblin_media/media_entries/415/snowden-final.webm'
122 #wget 'https://media.libreplanet.org/mgoblin_media/media_entries/167/FSF_640x360.webm'
123 #wget 'https://static.fsf.org/nosvn/FSF30-video/FSF_30_720p.webm'
124 #wget 'https://static.fsf.org/nosvn/videos/fsf-shoetool/fsf-shoetool-360.webm'
125 #wget 'https://static.fsf.org/nosvn/videos/fsf-heroes/videos/The-University-of-Costumed-Heroes-360p.webm'
126 #wget 'https://static.fsf.org/nosvn/member-cards/extra-media/2022-02-07/FSFKeynotewithSlidesHighRes.ogg'
127 #wget 'https://static.fsf.org/nosvn/member-cards/extra-media/2022-02-07/why-free-software.webm'
128 #wget 'https://static.fsf.org/nosvn/member-cards/extra-media/2022-02-07/fsfs-ii-2-1.pdf'
129 #wget 'https://audio-video.gnu.org/video/TEDxGE2014_Stallman05_LQ.webm'
130
131 mv snowden-final.webm lp2016_snowden.webm
132
133 wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2070/FSFKeynotewithSlidesHighRes.ogg'
134
135 wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2335/grandsun1715.webm' -O lp2020_kahle.webm
136 wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2332/grandsat0945.webm' -O lp2020_younghackers.webm
137
138 ###
139 ### copy over Trisquel 9 sources
140 ###
141
142
143 cp -vr $ISOTMP/* $DEVTMP/source/ || true
144
145
146 ###
147 ### clean up
148 ###
149
150
151 sync
152 sleep 3
153
154 umount $DEVTMP
155 umount $ISOTMP
156
157 rmdir $DEVTMP
158 rmdir $ISOTMP
159
160 sync
161
162 echo
163 echo "The FSF member card build is complete! : )"
164 echo
165