[archiso2dual] Add support for squashfs compression types
Add a note about supported status in Linux versions. Needs squashfs-tools-4.1 (now on extra). Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
This commit is contained in:
parent
487436b8ea
commit
af66220c75
@ -19,6 +19,7 @@ work_dir="/tmp/archiso2dual"
|
|||||||
isomounts_file="/usr/share/archiso2dual/isomounts"
|
isomounts_file="/usr/share/archiso2dual/isomounts"
|
||||||
syslinuxcfg_file="/usr/share/archiso2dual/syslinux.cfg"
|
syslinuxcfg_file="/usr/share/archiso2dual/syslinux.cfg"
|
||||||
removefiles_file="/usr/share/archiso2dual/removefiles.lst"
|
removefiles_file="/usr/share/archiso2dual/removefiles.lst"
|
||||||
|
compression="gzip"
|
||||||
appname=${0##*/}
|
appname=${0##*/}
|
||||||
_error="0"
|
_error="0"
|
||||||
_confirm="n"
|
_confirm="n"
|
||||||
@ -114,9 +115,9 @@ mksquashfs_image() {
|
|||||||
arch=${2}
|
arch=${2}
|
||||||
rm -f ${work_dir}/iso/${arch}/${img}.sqfs
|
rm -f ${work_dir}/iso/${arch}/${img}.sqfs
|
||||||
if [ "${quiet}" = "y" ]; then
|
if [ "${quiet}" = "y" ]; then
|
||||||
mksquashfs ${work_dir}/tmp/${arch}/${img} ${work_dir}/iso/${arch}/${img}.sqfs > /dev/null
|
mksquashfs ${work_dir}/tmp/${arch}/${img} ${work_dir}/iso/${arch}/${img}.sqfs -comp ${compression} > /dev/null
|
||||||
else
|
else
|
||||||
mksquashfs ${work_dir}/tmp/${arch}/${img} ${work_dir}/iso/${arch}/${img}.sqfs
|
mksquashfs ${work_dir}/tmp/${arch}/${img} ${work_dir}/iso/${arch}/${img}.sqfs -comp ${compression}
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -240,6 +241,12 @@ show_help()
|
|||||||
(default to '${publisher}')"
|
(default to '${publisher}')"
|
||||||
echo " -A <application> Set an application name for the disk
|
echo " -A <application> Set an application name for the disk
|
||||||
(default to '${application}')"
|
(default to '${application}')"
|
||||||
|
echo " -c <compressor> Set SquashFS compression type: gzip, lzma or lzo
|
||||||
|
(default to '${compression}')"
|
||||||
|
echo " NOTES:"
|
||||||
|
echo " lzma: not officially supported yet by Linux (2.6.36)"
|
||||||
|
echo " lzo: needs Linux >= 2.6.36"
|
||||||
|
|
||||||
echo " -y Confirm execution (otherwise only show configuration)"
|
echo " -y Confirm execution (otherwise only show configuration)"
|
||||||
echo " -v Enable verbose output"
|
echo " -v Enable verbose output"
|
||||||
echo " -h This message"
|
echo " -h This message"
|
||||||
@ -260,6 +267,7 @@ show_config() {
|
|||||||
echo " label: ${label}"
|
echo " label: ${label}"
|
||||||
echo " publisher: ${publisher}"
|
echo " publisher: ${publisher}"
|
||||||
echo " application: ${application}"
|
echo " application: ${application}"
|
||||||
|
echo " compression: ${compression}"
|
||||||
echo
|
echo
|
||||||
if [ "${profile_type}" = "full" ]; then
|
if [ "${profile_type}" = "full" ]; then
|
||||||
echo "These files will be deleted (selected via -R option)"
|
echo "These files will be deleted (selected via -R option)"
|
||||||
@ -335,7 +343,7 @@ if [ "$EUID" != "0" ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
while getopts '3:6:o:T:M:S:R:L:P:A:yvh' arg; do
|
while getopts '3:6:o:T:M:S:R:L:P:A:c:yvh' arg; do
|
||||||
case "${arg}" in
|
case "${arg}" in
|
||||||
3) isofile_i686="${OPTARG}" ;;
|
3) isofile_i686="${OPTARG}" ;;
|
||||||
6) isofile_x86_64="${OPTARG}" ;;
|
6) isofile_x86_64="${OPTARG}" ;;
|
||||||
@ -351,6 +359,7 @@ while getopts '3:6:o:T:M:S:R:L:P:A:yvh' arg; do
|
|||||||
L) label="${OPTARG}" ;;
|
L) label="${OPTARG}" ;;
|
||||||
P) publisher="${OPTARG}" ;;
|
P) publisher="${OPTARG}" ;;
|
||||||
A) application="${OPTARG}" ;;
|
A) application="${OPTARG}" ;;
|
||||||
|
c) compression="${OPTARG}" ;;
|
||||||
w) work_dir="${OPTARG}" ;;
|
w) work_dir="${OPTARG}" ;;
|
||||||
y) _confirm="y" ;;
|
y) _confirm="y" ;;
|
||||||
v) quiet="n"; _v="-v" ;;
|
v) quiet="n"; _v="-v" ;;
|
||||||
|
Loading…
Reference in New Issue
Block a user