manjaro-tools/lib/util-publish.sh

36 lines
998 B
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.
remote_login(){
#sshpass -f ${remote_pwd} ssh -t ${shell_url} create
2015-11-12 19:03:21 +01:00
ssh -t ${shell_url} create
cd ${remote_target}/${remote_project}
2015-11-12 19:03:21 +01:00
}
create_server_tree(){
remote_login
cd ${type}
2015-11-12 19:03:21 +01:00
# need to establish tree
mkdir -pv ${dist_release}
2015-11-12 19:03:21 +01:00
}
upload(){
msg "Start upload ..."
if ${is_sf};then
local files=$(ls ${cache_dir_iso})
sshpass -f ${remote_pwd} rsync -vP --progress -e ssh $files ${sf_url}
else
msg3 "Do something here if not sf"
fi
msg "Done upload"
msg3 "Time ${FUNCNAME}: $(elapsed_time ${timer_start}) minutes"
}