This commit is contained in:
parazyd 2017-04-19 23:31:08 +02:00
commit a67ef2cf00
No known key found for this signature in database
GPG Key ID: F0CB28FCF78637DE
4 changed files with 28 additions and 8 deletions

1
config
View File

@ -76,6 +76,7 @@ base_packages=(
zsh
rsync
git-core
mlocate
)
purge_packages+=(

View File

@ -17,7 +17,7 @@
# 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/>.
libdevuansdk_version="0.4"
libdevuansdk_version="0.5"
LIBPATH=${LIBPATH:-$(dirname $0)}
source $LIBPATH/config

View File

@ -151,6 +151,19 @@ bootstrap_tar_unpack() {
cat <<EOF | sudo tee ${strapdir}/postunpack >/dev/null
#!/bin/sh
apt-get update
## check if all our extra_packages exist
allpkgs="\$(apt-cache search '.' | cut -d' ' -f1)"
for i in ${extra_packages} ; do
printf "%s" "\$allpkgs" | grep -q "^\$i$" || missing="\$missing \$i"
done
[ -n "\$missing" ] && {
printf "\033[1;31m[!!] some extra packages don't exist\033[0m\n"
printf "%s\n" "\$missing"
exit 1
}
apt-get --yes --force-yes upgrade
apt-get --yes --force-yes install ${extra_packages}
apt-get --yes --force-yes autoremove

View File

@ -114,10 +114,12 @@ image_pack_dist() {
zerr
}
notice "compressing image with xz"
_xz="xz -zv"
[[ $(command -v pixz) ]] && _xz=pixz
notice "compressing image with $_xz"
silly
pushd $workdir
xz -zv ${image_name}.img
${=_xz} ${image_name}.img
notice "generating sha256 for ${image_name}.img.xz"
sha256sum ${image_name}.img.xz > ${image_name}.img.xz.sha
@ -143,9 +145,11 @@ image_raw_mount() {
sudo mount $rootpart $workdir/mnt && \
act "mounted root partition" || zerr
sudo mkdir $workdir/mnt/boot
sudo mount $bootpart $workdir/mnt/boot && \
act "mounted boot partition" || zerr
[[ "$parted_type" == gpt ]] || {
sudo mkdir $workdir/mnt/boot
sudo mount $bootpart $workdir/mnt/boot && \
act "mounted boot partition" || zerr
}
}
image_raw_umount() {
@ -153,8 +157,10 @@ image_raw_umount() {
req=(workdir bootpart rootpart)
ckreq || return 1
sudo umount $workdir/mnt/boot && act "unmounted boot partition" || zerr
sleep 1
[[ "$parted_type" == gpt ]] || {
sudo umount $workdir/mnt/boot && act "unmounted boot partition" || zerr
sleep 1
}
sudo umount $workdir/mnt && act "unmounted root partition" || zerr
}