| 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.tar /dev/sdX |
| 27 | echo Example: sudo $0 trisquel_11.0_sources.tar /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 | TAR=$1 |
| 38 | DEV=$2 |
| 39 | |
| 40 | DEVTMP=$(mktemp -d) |
| 41 | |
| 42 | mount ${DEV}1 $DEVTMP |
| 43 | |
| 44 | |
| 45 | ### |
| 46 | ### copy over checksum files |
| 47 | ### |
| 48 | |
| 49 | |
| 50 | mkdir -p $DEVTMP/fsf/GNUAV/ |
| 51 | mkdir -p $DEVTMP/source/ |
| 52 | |
| 53 | cp checksums-media.sha256 $DEVTMP/fsf/GNUAV/ |
| 54 | cp checksums.sha256 $DEVTMP/source/ |
| 55 | |
| 56 | |
| 57 | ### |
| 58 | ### copy over html files |
| 59 | ### |
| 60 | |
| 61 | |
| 62 | cp html/* $DEVTMP/fsf/ |
| 63 | rm -f $DEVTMP/fsf/reset.css |
| 64 | |
| 65 | |
| 66 | ### |
| 67 | ### download missing media from the Web |
| 68 | ### |
| 69 | |
| 70 | |
| 71 | cd $DEVTMP/fsf/GNUAV |
| 72 | |
| 73 | mkdir -p lp2023_audio ; cd lp2023_audio |
| 74 | |
| 75 | # |
| 76 | # In GMG Postgres DB: select * from core__mediafiles where file_path like '%2023%.ogg'; |
| 77 | # |
| 78 | |
| 79 | wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2765/lp2023-jupiter-sunday-1720.ogg' |
| 80 | wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2766/lp2023-jupiter-saturday-1225.ogg' |
| 81 | wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2767/lp2023-jupiter-sunday-1430.ogg' |
| 82 | wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2768/lp2023-neptune-saturday-1650.ogg' |
| 83 | wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2769/lp2023-saturn-saturday-1405.ogg' |
| 84 | wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2770/lp2023-jupiter-saturday-1000.ogg' |
| 85 | wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2771/lp2023-neptune-sunday-1055.ogg' |
| 86 | wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2772/lp2023-jupiter-saturday-1555.ogg' |
| 87 | wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2773/lp2023-neptune-sunday-1525.ogg' |
| 88 | wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2774/lp2023-jupiter-sunday-1055.ogg' |
| 89 | wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2775/lp2023-neptune-saturday-1500.ogg' |
| 90 | wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2776/lp2023-saturn-saturday-1000.ogg' |
| 91 | wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2777/lp2023-neptune-saturday-1405.ogg' |
| 92 | wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2778/lp2023-jupiter-sunday-1335.ogg' |
| 93 | wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2779/lp2023-jupiter-saturday-1405.ogg' |
| 94 | wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2780/lp2023-neptune-sunday-1155.ogg' |
| 95 | wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2781/lp2023-saturn-sunday-1000.ogg' |
| 96 | wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2782/lp2023-jupiter-saturday-1500.ogg' |
| 97 | wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2783/lp2023-saturn-saturday-1125.ogg' |
| 98 | wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2784/lp2023-jupiter-saturday-1750.ogg' |
| 99 | wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2785/lp2023-neptune-sunday-1430.ogg' |
| 100 | wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2786/lp2023-neptune-sunday-1335.ogg' |
| 101 | wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2787/lp2023-saturn-sunday-1055.ogg' |
| 102 | wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2788/lp2023-jupiter-sunday-1155.ogg' |
| 103 | wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2789/lp2023-jupiter-saturday-1125.ogg' |
| 104 | wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2790/lp2023-neptune-sunday-1000.ogg' |
| 105 | wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2791/lp2023-neptune-saturday-1555.ogg' |
| 106 | wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2792/lp2023-jupiter-sunday-1620.ogg' |
| 107 | wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2793/lp2023-jupiter-sunday-1525.ogg' |
| 108 | wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2794/lp2023-jupiter-saturday-1650.ogg' |
| 109 | wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2795/lp2023-saturn-saturday-1650.ogg' |
| 110 | wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2796/lp2023-saturn-saturday-1555.ogg' |
| 111 | wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2797/lp2023-neptune-sunday-1620.ogg' |
| 112 | wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2798/lp2023-saturn-saturday-1500.ogg' |
| 113 | wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2866/lp2023-jupiter-sunday-1000.ogg' |
| 114 | wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2875/lp2023-saturn-sunday-1620.ogg' |
| 115 | wget 'https://media.libreplanet.org/mgoblin_media/media_entries/3443/lp2023-bigcode-may-30.ogg' -O lp2023-saturn-sunday-1335.ogg |
| 116 | wget 'https://media.libreplanet.org/mgoblin_media/media_entries/3445/lp2023-worldvista-june-05.ogg' -O lp2023-saturn-sunday-1430.ogg |
| 117 | |
| 118 | |
| 119 | cd .. |
| 120 | |
| 121 | ### |
| 122 | ### media included in trisquel_11.0-fsf_amd64.iso |
| 123 | ### |
| 124 | # |
| 125 | # other/benjamin_mako_hill-revealing_errors.ogg |
| 126 | # other/benjamin_mako_hill-revealing_errors.txt |
| 127 | # other/bradley_kuhn-software_freedom_and_the_gnu_generation.ogg |
| 128 | # other/bradley_kuhn-software_freedom_and_the_gnu_generation.txt |
| 129 | # other/eben_moglen-free_software_and_free_media.ogg |
| 130 | # other/eben_moglen-free_software_and_free_media.txt |
| 131 | # other/fsf-2009-jeremyallison.ogv |
| 132 | # other/fsf-2009-jeremyallison.txt |
| 133 | # other/fsf-2009-peterbrown.ogv |
| 134 | # other/fsf-2009-peterbrown.txt |
| 135 | # other/fsf-shoetool-360.txt |
| 136 | # other/fsf-shoetool-360.webm |
| 137 | # other/stephen_fry-happy_birthday_gnu.ogg |
| 138 | # other/stephen_fry-happy_birthday_gnu.ogv |
| 139 | # other/stephen_fry-happy_birthday_gnu.txt |
| 140 | # other/The-University-of-Costumed-Heroes-360p.txt |
| 141 | # other/The-University-of-Costumed-Heroes-360p.webm |
| 142 | # rms/rms-copyright_versus_community_in_the_age_of_computer_networks.ogg |
| 143 | # rms/rms-copyright_versus_community_in_the_age_of_computer_networks.txt |
| 144 | # rms/rms-essays.pdf |
| 145 | # rms/rms-essays.txt |
| 146 | # rms/rms-free_software_freedom_and_community.ogg |
| 147 | # rms/rms-free_software_freedom_and_community.txt |
| 148 | # rms/rms-gplv3_launch.ogg |
| 149 | # rms/rms-gplv3_launch.txt |
| 150 | # rms/rms-patents_barriers_to_development.ogg |
| 151 | # rms/rms-patents_barriers_to_development.txt |
| 152 | # rms/rms-the_dangers_of_software_patents.ogg |
| 153 | # rms/rms-the_dangers_of_software_patents.txt |
| 154 | # rms/rms-what_is_free_software.ogg |
| 155 | # rms/rms-what_is_free_software.txt |
| 156 | |
| 157 | |
| 158 | wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2070/FSFKeynotewithSlidesHighRes.ogg' |
| 159 | |
| 160 | wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2763/lp2023-jupiter-sunday-1720.webm' -O lp2020_repair.webm |
| 161 | wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2799/lp2023-jupiter-saturday-1225.webm' -O lp2023_education.webm |
| 162 | |
| 163 | ### |
| 164 | ### copy over Trisquel 11 sources |
| 165 | ### |
| 166 | |
| 167 | |
| 168 | tar -C $DEVTMP/source/ --no-same-owner -xvf $TAR |
| 169 | |
| 170 | |
| 171 | ### |
| 172 | ### clean up |
| 173 | ### |
| 174 | |
| 175 | |
| 176 | sync |
| 177 | sleep 3 |
| 178 | |
| 179 | umount $DEVTMP |
| 180 | |
| 181 | rmdir $DEVTMP |
| 182 | |
| 183 | sync |
| 184 | |
| 185 | echo |
| 186 | echo "The FSF member card build is complete! : )" |
| 187 | echo |
| 188 | |