forked from mirrored-repos/manjaro-tools
set permissions on uploaded file
use sftp -p to transfer the file
This commit is contained in:
parent
4180b449cb
commit
5a889a8058
1 changed files with 22 additions and 7 deletions
|
@ -162,7 +162,8 @@ sync_latest_pkg_list(){
|
|||
msg2 "Uploading package list ..."
|
||||
local pkglist="latest-pkgs.txt"
|
||||
[[ ${MINIMAL} == "yes" ]] && pkglist="latest-minimal-pkgs.txt"
|
||||
scp "${src_dir}/${PKGLIST}" "${webshell}/${htdocs}/${pkglist}"
|
||||
chmod g+w "${src_dir}/${PKGLIST}"
|
||||
sftp -p "${webshell}/${htdocs}/${pkglist} <<<'put ${src_dir}/${PKGLIST}'"
|
||||
}
|
||||
|
||||
sync_latest_checksum_sha256(){
|
||||
|
@ -170,7 +171,9 @@ sync_latest_checksum_sha256(){
|
|||
local filename="${LATEST_ISO}.sha256"
|
||||
local checksum_file="latest.sha256"
|
||||
[[ ${MINIMAL} == "yes" ]] && checksum_file="latest-minimal.sha256"
|
||||
scp "${src_dir}/${filename}" "${webshell}/${htdocs}/${checksum_file}"
|
||||
#scp "${src_dir}/${filename}" "${webshell}/${htdocs}/${checksum_file}"
|
||||
chmod g+w "${src_dir}/${filename}"
|
||||
sftp -p "${webshell}/${htdocs}/${checksum_file} <<<'put ${src_dir}/${filename}'"
|
||||
}
|
||||
|
||||
sync_latest_checksum_sha1(){
|
||||
|
@ -178,7 +181,9 @@ sync_latest_checksum_sha1(){
|
|||
local filename="${LATEST_ISO}.sha1"
|
||||
local checksum_file="latest.sha1"
|
||||
[[ ${MINIMAL} == "yes" ]] && checksum_file="latest-minimal.sha1"
|
||||
scp "${src_dir}/${filename}" "${webshell}/${htdocs}/${checksum_file}"
|
||||
#scp "${src_dir}/${filename}" "${webshell}/${htdocs}/${checksum_file}"
|
||||
chmod g+w "${src_dir}/${filename}"
|
||||
sftp -p "${webshell}/${htdocs}/${checksum_file} <<<'put ${src_dir}/${filename}'"
|
||||
}
|
||||
|
||||
sync_latest_signature(){
|
||||
|
@ -186,7 +191,9 @@ sync_latest_signature(){
|
|||
local filename="${LATEST_ISO}.sig"
|
||||
local signature="latest.sig"
|
||||
[[ ${MINIMAL} == "yes" ]] && signature="latest-minimal.sig"
|
||||
scp "${src_dir}/${filename}" "${webshell}/${htdocs}/${signature}"
|
||||
#scp "${src_dir}/${filename}" "${webshell}/${htdocs}/${signature}"
|
||||
chmod g+w "${src_dir}/${filename}"
|
||||
sftp -p "${webshell}/${htdocs}/${signature} <<<'put ${src_dir}/${filename}'"
|
||||
}
|
||||
|
||||
sync_latest_torrent(){
|
||||
|
@ -194,19 +201,27 @@ sync_latest_torrent(){
|
|||
local filename="${LATEST_ISO}.torrent"
|
||||
local torrent="latest.torrent"
|
||||
[[ ${MINIMAL} == "yes" ]] && torrent="latest-minimal.torrent"
|
||||
scp "${src_dir}/${filename}" "${webshell}/${htdocs}/${torrent}"
|
||||
#scp "${src_dir}/${filename}" "${webshell}/${htdocs}/${torrent}"
|
||||
chmod g+w "${src_dir}/${filename}"
|
||||
sftp -p "${webshell}/${htdocs}/${torrent} <<<'put ${src_dir}/${filename}'"
|
||||
}
|
||||
|
||||
sync_latest_php(){
|
||||
msg2 "Uploading php redirector ..."
|
||||
local filename=".latest.php"
|
||||
local php="latest.php"
|
||||
[[ ${MINIMAL} == "yes" ]] && php="latest-minimal.php"
|
||||
scp "${src_dir}/.${php}" "${webshell}/${htdocs}/${php}"
|
||||
#scp "${src_dir}/.${php}" "${webshell}/${htdocs}/${php}"
|
||||
chmod g+w "${src_dir}/${filename}"
|
||||
sftp -p "${webshell}/${htdocs}/${php} <<<'put ${src_dir}/${filename}'"
|
||||
}
|
||||
|
||||
sync_latest_html(){
|
||||
msg2 "Uploading url redirector ..."
|
||||
local filename=".latest"
|
||||
local html="latest"
|
||||
[[ ${MINIMAL} == "yes" ]] && html="latest-minimal"
|
||||
scp "${src_dir}/.${html}" "${webshell}/${htdocs}/${html}"
|
||||
#scp "${src_dir}/.${html}" "${webshell}/${htdocs}/${html}"
|
||||
chmod g+w "${src_dir}/${filename}"
|
||||
sftp -p "${webshell}/${htdocs}/${html} <<<'put ${src_dir}/${filename}'"
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue