use sources .tar file, not .iso
authorAndrew Engelbrecht <andrew@fsf.org>
Tue, 1 Aug 2023 19:24:26 +0000 (15:24 -0400)
committerAndrew Engelbrecht <andrew@fsf.org>
Tue, 1 Aug 2023 19:24:26 +0000 (15:24 -0400)
trisquel 11 changed the sources archive format

install-extras.sh

index 120ee6ca4bb8e68be20ca8388185f0bf55bc05b6..204a78a378039e7bb69778eaf190dc1719ed9611 100755 (executable)
@@ -23,8 +23,8 @@ 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 Usage: sudo $0 sources.tar /dev/sdX
+echo Example: sudo $0 trisquel_11.0_sources.tar /dev/sdb
 echo
 echo WARNING!: This script can bite your dog. Use it with care, backup your data.
 echo
@@ -34,13 +34,11 @@ exit 1
 [ $(id -u) != 0 ] && usage
 [ $# != 2 ] && usage
 
-ISO=$1
+TAR=$1
 DEV=$2
 
-ISOTMP=$(mktemp -d)
 DEVTMP=$(mktemp -d)
 
-mount -o loop $ISO $ISOTMP
 mount ${DEV}1 $DEVTMP
 
 
@@ -144,7 +142,7 @@ wget 'https://media.libreplanet.org/mgoblin_media/media_entries/2332/grandsat094
 ### 
 
 
-cp -vr $ISOTMP/* $DEVTMP/source/ || true
+tar -C $DEVTMP/source/ -xvf $TAR
 
 
 ###
@@ -156,10 +154,8 @@ sync
 sleep 3
 
 umount $DEVTMP
-umount $ISOTMP
 
 rmdir $DEVTMP
-rmdir $ISOTMP
 
 sync