mirror of
https://github.com/Kron4ek/Conty
synced 2024-11-16 19:50:06 +01:00
Fix use_existing_image
This commit is contained in:
parent
1c47c77f4b
commit
3ac0e819e4
1 changed files with 13 additions and 13 deletions
|
@ -28,17 +28,6 @@ if [ ! -f conty-start.sh ]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
if ! command -v mksquashfs 1>/dev/null; then
|
||||
echo "Please install squashfs-tools and run the script again"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -d "${bootstrap}" ]; then
|
||||
echo "Distro bootstrap is required!"
|
||||
echo "Use the create-arch-bootstrap.sh script to get it"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check if selected compression algorithm is supported by mksquashfs
|
||||
if command -v grep 1>/dev/null; then
|
||||
# mksquashfs writes its output to stderr instead of stdout
|
||||
|
@ -49,10 +38,10 @@ if command -v grep 1>/dev/null; then
|
|||
echo "compression algorithm (${squashfs_compressor})."
|
||||
echo
|
||||
echo "Choose another algorithm and run the script again"
|
||||
|
||||
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
rm -f mksquashfs_out.txt
|
||||
fi
|
||||
|
||||
|
@ -62,6 +51,17 @@ echo
|
|||
|
||||
# Create the squashfs image
|
||||
if [ ! -f image ] || [ "${use_existing_image}" != "true" ]; then
|
||||
if ! command -v mksquashfs 1>/dev/null; then
|
||||
echo "Please install squashfs-tools and run the script again"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -d "${bootstrap}" ]; then
|
||||
echo "Distro bootstrap is required!"
|
||||
echo "Use the create-arch-bootstrap.sh script to get it"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
rm -f image
|
||||
mksquashfs "${bootstrap}" image -b 256K -comp ${squashfs_compressor} ${compressor_arguments}
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue