From: garciadeblas Date: Fri, 22 Apr 2022 10:15:45 +0000 (+0200) Subject: Add tool upload-installer.sh to upload installer to FTP server X-Git-Tag: v12.0.0rc1~11 X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2Fdevops.git;a=commitdiff_plain;h=82c42d066642f83531f1a51f28d289b3e18f4344 Add tool upload-installer.sh to upload installer to FTP server Change-Id: I62e9eaeabb915b7b8da01fe1aa65b03fdd1f8619 Signed-off-by: garciadeblas --- diff --git a/tools/env-ftp b/tools/env-ftp new file mode 100644 index 00000000..fafb2bed --- /dev/null +++ b/tools/env-ftp @@ -0,0 +1,26 @@ +#!/bin/bash +####################################################################################### +# Copyright ETSI Contributors and Others. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +# implied. +# See the License for the specific language governing permissions and +# limitations under the License. +####################################################################################### + +SERVER="ftp://osm-download.etsi.org" +FOLDER="osm-12.0-twelve" +FTP_OPTS="" + +# Define your FTP credentials in a separate (private file) +# local/.credentials +# USERNAME= +# PASSWORD= diff --git a/tools/upload-installer.sh b/tools/upload-installer.sh new file mode 100755 index 00000000..706b7525 --- /dev/null +++ b/tools/upload-installer.sh @@ -0,0 +1,41 @@ +#!/bin/bash +####################################################################################### +# Copyright ETSI Contributors and Others. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +# implied. +# See the License for the specific language governing permissions and +# limitations under the License. +####################################################################################### +# +# Script to upload documentation to ETSI site +# + +source ./env-ftp + +# Get credentias (file or interactive) +if [ -f local/.credentials ]; then + source local/.credentials + echo SERVER=${SERVER} + echo USERNAME=${USERNAME} +else + echo "Enter credentials for ${SERVER} (ETSI On Line account)" + read -p "Username: " USERNAME + read -sp "Password: " PASSWORD +fi + +lftp ${FTP_OPTS} -u ${USERNAME},${PASSWORD} ${SERVER} << ! + set ftp:ssl-allow no + cd ${FOLDER} + lcd ../installers + put install_osm.sh + bye +!