2015-11-12 19:03:21 +01:00
|
|
|
#!/bin/bash
|
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation; version 2 of the License.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
|
2015-11-13 12:33:48 +01:00
|
|
|
create_release(){
|
2015-11-13 21:27:16 +01:00
|
|
|
ssh !${remote_user}@${shell_url} mkdir -pv ${remote_target}/${remote_project}/${iso_edition}/${dist_release}
|
2015-11-12 19:03:21 +01:00
|
|
|
}
|
|
|
|
|
2015-11-17 17:04:04 +01:00
|
|
|
sync_dir(){
|
|
|
|
msg "Start upload [$1] ..."
|
2015-11-13 21:27:16 +01:00
|
|
|
local empty=/tmp/deploy
|
2015-11-17 17:04:04 +01:00
|
|
|
rsync -aR -e ssh $empty/ ${sf_url}/${iso_edition}/
|
|
|
|
rsync -aR -e ssh $empty/ ${sf_url}/${iso_edition}/${dist_release}/
|
|
|
|
rsync -avP --progress -e ssh ${src_dir}/ ${sf_url}/${iso_edition}/${dist_release}/$1
|
|
|
|
|
|
|
|
# rsync -aq --rsync-path=”mkdir -p /tmp/${iso_edition}/${dist_release}/${profile}/ && rsync” ${src_dir}/ ${remote_user}@${shell_url}/${remote_target}/${remote_project}
|
|
|
|
|
2015-11-12 19:03:21 +01:00
|
|
|
msg "Done upload"
|
|
|
|
msg3 "Time ${FUNCNAME}: $(elapsed_time ${timer_start}) minutes"
|
|
|
|
}
|
2015-11-17 17:04:04 +01:00
|
|
|
|
|
|
|
upload(){
|
|
|
|
if ${is_buildset};then
|
|
|
|
for prof in $(cat ${sets_dir_iso}/$1.set); do
|
|
|
|
sync_dir "$prof"
|
|
|
|
done
|
|
|
|
else
|
|
|
|
sync_dir "$1"
|
|
|
|
fi
|
|
|
|
}
|