[deployiso] add $arch option

This commit is contained in:
udeved 2015-11-27 12:22:38 +01:00
parent 342f891160
commit ac789ff02f
4 changed files with 22 additions and 4 deletions

View file

@ -49,6 +49,7 @@ display_settings(){
msg2 "is_buildset: ${is_buildset}"
msg "OPTIONS:"
msg2 "arch: ${arch}"
msg2 "limit: ${limit} kB/s"
msg "ARGS:"
@ -86,6 +87,7 @@ rsync_args=(-aP --progress -e ssh)
usage() {
echo "Usage: ${0##*/} [options]"
echo " -p Source folder to upload [default:${buildset_iso}]"
echo " -a Arch to upload [default:${arch}]"
echo " -l Limit bandwidth in kB/s [default:${limit}]"
echo ' -c Create new remote edition_type with subtree'
echo ' -u Update remote iso'
@ -97,11 +99,12 @@ usage() {
exit $1
}
opts='p:l:cuvqh'
opts='p:a:l:cuvqh'
while getopts "${opts}" arg; do
case "${arg}" in
p) buildset_iso="$OPTARG" ;;
a) arch="$OPTARG" ;;
l) limit="$OPTARG" ;;
c) remote_create=true ;;
u) update=true; rsync_args+=(-u) ;;

View file

@ -618,7 +618,7 @@ load_profile(){
[[ -d ${work_dir}/root-image ]] && check_chroot_version "${work_dir}/root-image"
remote_tree="${edition_type}/$1/${dist_release}"
remote_tree="${edition_type}/$1/${dist_release}/${arch}"
cache_dir_iso="${cache_dir}/iso/${remote_tree}"
prepare_dir "${cache_dir_iso}"

View file

@ -15,10 +15,11 @@ create_subtree_ssh(){
}
create_subtree(){
msg "Create (${edition_type}/$1) ..."
msg2 "Create (${edition_type}/$1) ..."
rsync ${rsync_args[*]} /dev/null ${sf_url}/${edition_type}/
rsync ${rsync_args[*]} /dev/null ${sf_url}/${edition_type}/$1/
msg "Done"
rsync ${rsync_args[*]} /dev/null ${sf_url}/${edition_type}/$1/${dist_release}/
msg2 "Done"
msg3 "Time ${FUNCNAME}: $(elapsed_time ${timer_start}) minutes"
}

View file

@ -415,3 +415,17 @@ is_valid_edition(){
*) return 1 ;;
esac
}
is_valid_arch_pkg(){
case $1 in
'i686'|'x86_64'|'multilib') return 0 ;;
*) return 1 ;;
esac
}
is_valid_arch_iso(){
case $1 in
'i686'|'x86_64') return 0 ;;
*) return 1 ;;
esac
}