nix-tools/lib/util-publish.sh

40 lines
1.1 KiB
Bash
Raw Normal View History

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(){
ssh !${remote_user}@${shell_url} mkdir -pv ${remote_target}/${remote_project}/${remote_tree}
2015-11-12 19:03:21 +01:00
}
sync_dir(){
cd $1
load_profile "$1"
msg "Start upload [$1] ..."
if ${remote_create}; then
2015-11-24 01:00:22 +01:00
rsync ${rsync_args[*]} /dev/null ${sf_url}/${edition_type}/
rsync ${rsync_args[*]} /dev/null ${sf_url}/${remote_tree}/
fi
2015-11-24 16:58:40 +01:00
rsync ${rsync_args[*]} ${cache_dir_iso}/ ${sf_url}/${remote_tree}/$1
msg "Done upload [$1]"
msg3 "Time ${FUNCNAME}: $(elapsed_time ${timer_start}) minutes"
cd ..
2015-11-12 19:03:21 +01:00
}
upload(){
if ${is_buildset};then
2015-11-24 01:00:22 +01:00
for prof in ${buildlist[@]}; do
sync_dir "$prof"
done
else
sync_dir "${buildset_iso}"
fi
}