mklni: Use util-linux umount and fix typo pakages -> packages

This commit is contained in:
timoxa0 2024-11-03 14:11:56 +05:00
parent 9abc331272
commit 63d6510089

10
mklni
View file

@ -236,15 +236,15 @@ install_chroot()
log "Failed to update apk repos" error log "Failed to update apk repos" error
exit 1 exit 1
} }
log "Installing pakages" log "Installing packages"
chroot "$CHROOTDIR" apk add --quiet shadow fish bash git debootstrap pixz losetup rsync pv wget e2fsprogs e2fsprogs-extra libarchive-tools coreutils go libusb libusb-dev pkgconfig || { chroot "$CHROOTDIR" apk add --quiet shadow umount fish bash git debootstrap pixz losetup rsync pv wget e2fsprogs e2fsprogs-extra libarchive-tools coreutils go libusb libusb-dev pkgconfig || {
log "Failed to install packages" error log "Failed to install packages" error
exit 1 exit 1
} }
chroot "$CHROOTDIR" chsh -s /usr/bin/fish root chroot "$CHROOTDIR" chsh -s /usr/bin/fish root
log "Cloning makelni repo" log "Cloning makelni repo"
chroot "$CHROOTDIR" git clone --quiet "https://git.timoxa0.su/timoxa0/makelni.git" /makelni || { chroot "$CHROOTDIR" git clone --recursive "https://git.timoxa0.su/timoxa0/makelni.git" /makelni || {
log "Failed to clone makelni repo" error log "Failed to clone makelni repo" error
exit 1 exit 1
} }
@ -260,7 +260,7 @@ install_chroot()
log "Installing lon-tool" log "Installing lon-tool"
{ {
chroot "$CHROOTDIR" git clone --quiet https://git.timoxa0.su/timoxa0/lon-tool.git /lon-tool-src && chroot "$CHROOTDIR" git clone --recursive https://git.timoxa0.su/timoxa0/lon-tool.git /lon-tool-src &&
chroot "$CHROOTDIR" /bin/bash -c 'cd /lon-tool-src && rev=$(git describe --abbrev=4 --dirty --always --tags) && go get git.timoxa0.su/timoxa0/lon-tool/cmd && go build -ldflags "-X git.timoxa0.su/timoxa0/lon-tool/cmd.version=$rev" -o /bin/lon-tool main.go' chroot "$CHROOTDIR" /bin/bash -c 'cd /lon-tool-src && rev=$(git describe --abbrev=4 --dirty --always --tags) && go get git.timoxa0.su/timoxa0/lon-tool/cmd && go build -ldflags "-X git.timoxa0.su/timoxa0/lon-tool/cmd.version=$rev" -o /bin/lon-tool main.go'
} || { } || {
@ -392,7 +392,7 @@ update()
} }
log "Updating makelni" log "Updating makelni"
chroot "$CHROOTDIR" /bin/bash -c "cd /makelni && git pull" chroot "$CHROOTDIR" /bin/bash -c "cd /makelni && git submodule update --init && git pull --recurse-submodules --rebase"
local exitcode=$? local exitcode=$?
detach_chroot || { detach_chroot || {