forked from mirrored-repos/manjaro-tools
buildiso: add sign option #188
This commit is contained in:
parent
472cede6d6
commit
2b7898e4ce
3 changed files with 10 additions and 1 deletions
|
@ -230,6 +230,7 @@ Usage: buildiso [options]
|
|||
[default: linux44]
|
||||
-i <name> Init system to use
|
||||
[default: systemd]
|
||||
-s Sign the iso
|
||||
-c Disable clean work dir
|
||||
-x Build images only
|
||||
-z Generate iso only
|
||||
|
|
|
@ -114,6 +114,7 @@ pretend=false
|
|||
images_only=false
|
||||
iso_only=false
|
||||
verbose=false
|
||||
sign=false
|
||||
|
||||
pacman_conf_arch='default'
|
||||
|
||||
|
@ -130,6 +131,7 @@ usage() {
|
|||
echo " [default: ${kernel}]"
|
||||
echo ' -i <name> Init system to use'
|
||||
echo " [default: ${initsys}]"
|
||||
echo ' -s Sign the iso'
|
||||
echo ' -c Disable clean work dir'
|
||||
echo ' -x Build images only'
|
||||
echo ' -z Generate iso only'
|
||||
|
@ -144,7 +146,7 @@ usage() {
|
|||
|
||||
orig_argv=("$@")
|
||||
|
||||
opts='p:a:b:r:t:k:i:czxvqh'
|
||||
opts='p:a:b:r:t:k:i:czxsvqh'
|
||||
|
||||
while getopts "${opts}" arg; do
|
||||
case "${arg}" in
|
||||
|
@ -155,6 +157,7 @@ while getopts "${opts}" arg; do
|
|||
t) cache_dir_iso="$OPTARG" ;;
|
||||
k) kernel="$OPTARG" ;;
|
||||
i) initsys="$OPTARG" ;;
|
||||
s) sign=true ;;
|
||||
c) clean_first=false ;;
|
||||
x) images_only=true ;;
|
||||
z) iso_only=true ;;
|
||||
|
|
|
@ -588,10 +588,15 @@ load_profile(){
|
|||
prepare_dir "${iso_dir}"
|
||||
}
|
||||
|
||||
sign_iso(){
|
||||
su ${OWNER} -c "signiso ${iso_dir}/$1"
|
||||
}
|
||||
|
||||
compress_images(){
|
||||
local timer=$(get_timer)
|
||||
make_iso
|
||||
make_checksum "${iso_file}"
|
||||
${sign} && sign_iso "${iso_file}"
|
||||
chown -R "${OWNER}:users" "${iso_dir}"
|
||||
show_elapsed_time "${FUNCNAME}" "${timer_start}"
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue