[configs/releng] Add new build mode: all
This mode allow to build all 6 ISOs in just one step if build type is <all>. So "build.sh build all all" -> (single-i686, single-x86_64, dual) X (netinstall, core). Note that the <purge> command is executed between each build step to save space, so do not use this mode if you want to keep all temporal files in work_dir. Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
This commit is contained in:
parent
8f21e9611e
commit
4d02fff37e
22
README
22
README
@ -239,9 +239,6 @@ used to build official images with much more things.
|
|||||||
|
|
||||||
*** Building official Arch Linux live media. (configs/releng)
|
*** Building official Arch Linux live media. (configs/releng)
|
||||||
|
|
||||||
Note: These steps should be done in 64-bit and build.sh should be executed
|
|
||||||
on the same build directory or use -w <work_dir> option.
|
|
||||||
|
|
||||||
* Install needed packages.
|
* Install needed packages.
|
||||||
# pacman -S git make squashfs-tools libisoburn --needed
|
# pacman -S git make squashfs-tools libisoburn --needed
|
||||||
|
|
||||||
@ -249,20 +246,7 @@ on the same build directory or use -w <work_dir> option.
|
|||||||
# git clone git://projects.archlinux.org/archiso.git
|
# git clone git://projects.archlinux.org/archiso.git
|
||||||
# make -C archiso/archiso install
|
# make -C archiso/archiso install
|
||||||
|
|
||||||
* Build netinstall and core images (32-bit)
|
* Build them!
|
||||||
# linux32 /usr/share/archiso/configs/releng/build.sh build single all
|
# /usr/share/archiso/configs/releng/build.sh build all all
|
||||||
|
|
||||||
* Delete uneeded files (32-bit)
|
Note: See build.sh -h for more options.
|
||||||
# linux32 /usr/share/archiso/configs/releng/build.sh purge single
|
|
||||||
|
|
||||||
* Build netinstall and core images (64-bit)
|
|
||||||
# /usr/share/archiso/configs/releng/build.sh build single all
|
|
||||||
|
|
||||||
* Delete uneeded files (64-bit)
|
|
||||||
# /usr/share/archiso/configs/releng/build.sh purge single
|
|
||||||
|
|
||||||
* Build netinstall and core images (dual 32/64 bit)
|
|
||||||
# /usr/share/archiso/configs/releng/build.sh build dual all
|
|
||||||
|
|
||||||
* Delete uneeded files (dual 32/64 bit)
|
|
||||||
# /usr/share/archiso/configs/releng/build.sh purge dual
|
|
||||||
|
@ -10,6 +10,7 @@ arch=$(uname -m)
|
|||||||
work_dir=work
|
work_dir=work
|
||||||
out_dir=out
|
out_dir=out
|
||||||
verbose=""
|
verbose=""
|
||||||
|
cmd_args=""
|
||||||
|
|
||||||
script_path=$(readlink -f ${0%/*})
|
script_path=$(readlink -f ${0%/*})
|
||||||
|
|
||||||
@ -296,7 +297,7 @@ _usage ()
|
|||||||
echo " Clean working directory and .iso file in output directory of build <mode>"
|
echo " Clean working directory and .iso file in output directory of build <mode>"
|
||||||
echo
|
echo
|
||||||
echo " Command options:"
|
echo " Command options:"
|
||||||
echo " <mode> Valid values 'single' or 'dual'"
|
echo " <mode> Valid values 'single', 'dual' or 'all'"
|
||||||
echo " <type> Valid values 'netinstall', 'core' or 'all'"
|
echo " <type> Valid values 'netinstall', 'core' or 'all'"
|
||||||
exit ${1}
|
exit ${1}
|
||||||
}
|
}
|
||||||
@ -308,13 +309,34 @@ fi
|
|||||||
|
|
||||||
while getopts 'N:V:L:D:w:o:vh' arg; do
|
while getopts 'N:V:L:D:w:o:vh' arg; do
|
||||||
case "${arg}" in
|
case "${arg}" in
|
||||||
N) iso_name="${OPTARG}" ;;
|
N)
|
||||||
V) iso_version="${OPTARG}" ;;
|
iso_name="${OPTARG}"
|
||||||
L) iso_label="${OPTARG}" ;;
|
cmd_args+=" -N ${iso_name}"
|
||||||
D) install_dir="${OPTARG}" ;;
|
;;
|
||||||
w) work_dir="${OPTARG}" ;;
|
V)
|
||||||
o) out_dir="${OPTARG}" ;;
|
iso_version="${OPTARG}"
|
||||||
v) verbose="-v" ;;
|
cmd_args+=" -V ${iso_version}"
|
||||||
|
;;
|
||||||
|
L)
|
||||||
|
iso_label="${OPTARG}"
|
||||||
|
cmd_args+=" -L ${iso_label}"
|
||||||
|
;;
|
||||||
|
D)
|
||||||
|
install_dir="${OPTARG}"
|
||||||
|
cmd_args+=" -D ${install_dir}"
|
||||||
|
;;
|
||||||
|
w)
|
||||||
|
work_dir="${OPTARG}"
|
||||||
|
cmd_args+=" -w ${work_dir}"
|
||||||
|
;;
|
||||||
|
o)
|
||||||
|
out_dir="${OPTARG}"
|
||||||
|
cmd_args+=" -o ${out_dir}"
|
||||||
|
;;
|
||||||
|
v)
|
||||||
|
verbose="-v"
|
||||||
|
cmd_args+=" -v"
|
||||||
|
;;
|
||||||
h|?) _usage 0 ;;
|
h|?) _usage 0 ;;
|
||||||
*)
|
*)
|
||||||
_msg_error "Invalid argument '${arg}'" 0
|
_msg_error "Invalid argument '${arg}'" 0
|
||||||
@ -345,6 +367,11 @@ if [[ ${command_name} == "build" ]]; then
|
|||||||
command_type="${3}"
|
command_type="${3}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ ${command_mode} == "all" && ${arch} != "x86_64" ]]; then
|
||||||
|
echo "This mode <all> needs to be run on x86_64"
|
||||||
|
_usage 1
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ ${command_mode} == "single" ]]; then
|
if [[ ${command_mode} == "single" ]]; then
|
||||||
work_dir=${work_dir}/${arch}
|
work_dir=${work_dir}/${arch}
|
||||||
fi
|
fi
|
||||||
@ -390,6 +417,22 @@ case "${command_name}" in
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
|
all)
|
||||||
|
case "${command_type}" in
|
||||||
|
netinstall|core|all)
|
||||||
|
$0 ${cmd_args} build single ${command_type}
|
||||||
|
$0 ${cmd_args} purge single
|
||||||
|
linux32 $0 ${cmd_args} build single ${command_type}
|
||||||
|
linux32 $0 ${cmd_args} purge single
|
||||||
|
$0 ${cmd_args} build dual ${command_type}
|
||||||
|
$0 ${cmd_args} purge dual
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Invalid build type '${command_type}'"
|
||||||
|
_usage 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Invalid build mode '${command_mode}'"
|
echo "Invalid build mode '${command_mode}'"
|
||||||
_usage 1
|
_usage 1
|
||||||
@ -404,6 +447,11 @@ case "${command_name}" in
|
|||||||
dual)
|
dual)
|
||||||
purge_dual
|
purge_dual
|
||||||
;;
|
;;
|
||||||
|
all)
|
||||||
|
$0 ${cmd_args} purge single
|
||||||
|
linux32 $0 ${cmd_args} purge single
|
||||||
|
$0 ${cmd_args} purge dual
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Invalid purge mode '${command_mode}'"
|
echo "Invalid purge mode '${command_mode}'"
|
||||||
_usage 1
|
_usage 1
|
||||||
@ -418,6 +466,11 @@ case "${command_name}" in
|
|||||||
dual)
|
dual)
|
||||||
clean_dual
|
clean_dual
|
||||||
;;
|
;;
|
||||||
|
all)
|
||||||
|
$0 ${cmd_args} clean single
|
||||||
|
linux32 $0 ${cmd_args} clean single
|
||||||
|
$0 ${cmd_args} clean dual
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Invalid clean mode '${command_mode}'"
|
echo "Invalid clean mode '${command_mode}'"
|
||||||
_usage 1
|
_usage 1
|
||||||
|
Loading…
Reference in New Issue
Block a user