From: Andrew Engelbrecht Date: Wed, 23 Sep 2020 20:05:48 +0000 (-0400) Subject: initial version of extra media installer script X-Git-Url: https://vcs.fsf.org/?p=fsf-member-card-builder.git;a=commitdiff_plain;h=1da0abae72ec0536a7e72af29bcf00c28f7301e1;hp=2f56ad2dff1cf1d4ea3f2ea5f07be36303672882 initial version of extra media installer script --- diff --git a/install-extras.sh b/install-extras.sh new file mode 100755 index 0000000..e05e664 --- /dev/null +++ b/install-extras.sh @@ -0,0 +1,136 @@ +#!/bin/bash +# +# Copyright (C) 2012-2020 Ruben Rodriguez +# Copyright (C) 2020 Andrew Engelbrecht +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# + +set -e + +usage(){ +echo +echo You need to run this script as root +echo Usage: sudo $0 sources.iso /dev/sdX +echo Example: sudo $0 trisquel_9.0fsf_sources.iso /dev/sdb +echo +echo WARNING!: This script can bite your dog. Use it with care, backup your data. +echo +exit 1 +} + +[ $(id -u) != 0 ] && usage +[ $# != 2 ] && usage + +ISO=$1 +DEV=$2 + +ISOTMP=$(mktemp -d) +DEVTMP=$(mktemp -d) + +mount -o loop $ISO $ISOTMP +mount ${DEV}1 $DEVTMP + + +### +### copy over checksum files +### + + +mkdir -p $DEVTMP/fsf/GNUAV/ +mkdir -p $DEVTMP/source/ + +cp checksums-media.sha256 $DEVTMP/fsf/GNUAV/ +cp checksums-media.sha256 $DEVTMP/source/ + + +### +### download missing media from the Web +### + +cd $DEVTMP/fsf/GNUAV + +mkdir lp2020_audio ; cd lp2020_audio + +wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2414/freedomsun1525.ogg' +wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2413/freedomsun1135.ogg' +wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2412/grandsat1730.ogg' +wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2411/grandsun0945.ogg' +wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2410/grandsat0945.ogg' + +wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2409/freedomsun1335.ogg' +wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2408/patriotsun1135.ogg' +wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2407/grandsat1620.ogg' +wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2406/patriotsat1335.ogg' +wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2405/freedomsat1040.ogg' + +wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2404/patriotsun1620.ogg' +wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2403/grandsun1620.ogg' +wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2402/patriotsun1525.ogg' +wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2401/grandsun1525.ogg' +wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2400/patriotsun1430.ogg' + +wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2399/freedomsun1430.ogg' +wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2398/grandsun1430.ogg' +wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2397/patriotsun1335.ogg' +wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2396/patriotsun1040.ogg' +wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2395/freedomsun1040.ogg' + +wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2394/freedomsat1525.ogg' +wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2393/grandsat1525.ogg' +wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2392/freedomsat1430.ogg' +wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2391/patriotsat1135.ogg' +wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2390/grandsat1135.ogg' + +wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2389/patriotsat1040.ogg' +wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2388/grandsat1335.ogg' +wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2387/grandsat1430.ogg' +wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2386/patriotsat1430.ogg' +wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2385/freedomsat1335.ogg' + +wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2384/grandsun1715.ogg' + +cd .. + + +mv snowden-final.webm lp2016_snowden.webm + +wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2070/FSFKeynotewithSlidesHighRes.ogg' + +wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2335/grandsun1715.webm' -O lp2020_kahle.webm +wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2332/grandsat0945.webm' -O lp2020_younghackers.webm + + +### +### copy over Trisquel 9 sources +### + + +cp -vr $ISOTMP/* $DEVTMP/source/ || true + + +### +### clean up +### + + +umount $DEVTMP +umount $ISOTMP + +rmdir $DEVTMP +rmdir $ISOTMP + +sync +