[deployiso] add $arch option
This commit is contained in:
parent
342f891160
commit
ac789ff02f
4 changed files with 22 additions and 4 deletions
|
@ -49,6 +49,7 @@ display_settings(){
|
||||||
msg2 "is_buildset: ${is_buildset}"
|
msg2 "is_buildset: ${is_buildset}"
|
||||||
|
|
||||||
msg "OPTIONS:"
|
msg "OPTIONS:"
|
||||||
|
msg2 "arch: ${arch}"
|
||||||
msg2 "limit: ${limit} kB/s"
|
msg2 "limit: ${limit} kB/s"
|
||||||
|
|
||||||
msg "ARGS:"
|
msg "ARGS:"
|
||||||
|
@ -86,6 +87,7 @@ rsync_args=(-aP --progress -e ssh)
|
||||||
usage() {
|
usage() {
|
||||||
echo "Usage: ${0##*/} [options]"
|
echo "Usage: ${0##*/} [options]"
|
||||||
echo " -p Source folder to upload [default:${buildset_iso}]"
|
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 " -l Limit bandwidth in kB/s [default:${limit}]"
|
||||||
echo ' -c Create new remote edition_type with subtree'
|
echo ' -c Create new remote edition_type with subtree'
|
||||||
echo ' -u Update remote iso'
|
echo ' -u Update remote iso'
|
||||||
|
@ -97,11 +99,12 @@ usage() {
|
||||||
exit $1
|
exit $1
|
||||||
}
|
}
|
||||||
|
|
||||||
opts='p:l:cuvqh'
|
opts='p:a:l:cuvqh'
|
||||||
|
|
||||||
while getopts "${opts}" arg; do
|
while getopts "${opts}" arg; do
|
||||||
case "${arg}" in
|
case "${arg}" in
|
||||||
p) buildset_iso="$OPTARG" ;;
|
p) buildset_iso="$OPTARG" ;;
|
||||||
|
a) arch="$OPTARG" ;;
|
||||||
l) limit="$OPTARG" ;;
|
l) limit="$OPTARG" ;;
|
||||||
c) remote_create=true ;;
|
c) remote_create=true ;;
|
||||||
u) update=true; rsync_args+=(-u) ;;
|
u) update=true; rsync_args+=(-u) ;;
|
||||||
|
|
|
@ -618,7 +618,7 @@ load_profile(){
|
||||||
|
|
||||||
[[ -d ${work_dir}/root-image ]] && check_chroot_version "${work_dir}/root-image"
|
[[ -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}"
|
cache_dir_iso="${cache_dir}/iso/${remote_tree}"
|
||||||
prepare_dir "${cache_dir_iso}"
|
prepare_dir "${cache_dir_iso}"
|
||||||
|
|
|
@ -15,10 +15,11 @@ create_subtree_ssh(){
|
||||||
}
|
}
|
||||||
|
|
||||||
create_subtree(){
|
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}/
|
||||||
rsync ${rsync_args[*]} /dev/null ${sf_url}/${edition_type}/$1/
|
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"
|
msg3 "Time ${FUNCNAME}: $(elapsed_time ${timer_start}) minutes"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
14
lib/util.sh
14
lib/util.sh
|
@ -415,3 +415,17 @@ is_valid_edition(){
|
||||||
*) return 1 ;;
|
*) return 1 ;;
|
||||||
esac
|
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
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue