rsync (1259B)
1 #!/usr/bin/env zsh 2 # Copyright (c) 2016-2020 Dyne.org Foundation 3 # libdevuansdk is maintained by Ivan J. <parazyd@dyne.org> 4 # 5 # This file is part of libdevuansdk 6 # 7 # This source code is free software: you can redistribute it and/or modify 8 # it under the terms of the GNU General Public License as published by 9 # the Free Software Foundation, either version 3 of the License, or 10 # (at your option) any later version. 11 # 12 # This software is distributed in the hope that it will be useful, 13 # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 # GNU General Public License for more details. 16 # 17 # You should have received a copy of the GNU General Public License 18 # along with this source code. If not, see <http://www.gnu.org/licenses/>. 19 20 ## ilpd 21 22 rsync_to_raw_image() { 23 fn rsync_to_raw_image 24 req=(workdir strapdir bootpart rootpart) 25 ckreq || return 1 26 27 notice "Preparing to rsync and tar the rootfs..." 28 image_raw_mount 29 silly sleep 1 30 31 mkdir -p $R/dist 32 pushd $strapdir 33 tar_strapdir || zerr 34 35 notice "rsyncing strapdir to raw image..." 36 sudo rsync -HPaq ./* $workdir/mnt || { 37 image_raw_umount 38 die "not enough space, please report a bug" 39 zerr 40 } 41 popd 42 43 image_raw_umount 44 }