50 lines
1.3 KiB
Bash
50 lines
1.3 KiB
Bash
#!/usr/bin/env zsh
|
|
# Copyright (c) 2016 Dyne.org Foundation
|
|
# libdevuansdk is maintained by Ivan J. <parazyd@dyne.org>
|
|
#
|
|
# This file is part of libdevuansdk
|
|
#
|
|
# This source code 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 3 of the License, or
|
|
# (at your option) any later version.
|
|
#
|
|
# This software 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 source code. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
## ilpd
|
|
|
|
rsync_to_raw_image() {
|
|
fn rsync_to_raw_image
|
|
req=(workdir strapdir bootpart rootpart)
|
|
ckreq || return 1
|
|
|
|
notice "rsyncing strapdir to raw image..."
|
|
image_raw_mount
|
|
|
|
silly
|
|
pushd $strapdir
|
|
sudo rm -f .done
|
|
sudo rsync -HPavz -q --exclude={./boot} ./* $workdir/root || {
|
|
image_raw_umount
|
|
die "not enough space. report a bug please"
|
|
zerr
|
|
}
|
|
|
|
if [[ $parted_type = dos ]]; then
|
|
sudo rsync -HPavz -q ./boot/* $workdir/boot || {
|
|
image_raw_umount
|
|
die "not enough space. report a bug please"
|
|
zerr
|
|
}
|
|
fi
|
|
popd
|
|
|
|
image_raw_umount
|
|
}
|