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: v10.1.1-rc1~3 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=ae43a279a6b6e2472032d9c736ec1bd2329ada49;p=osm%2Fdevops.git 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..937d653e --- /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-10.0-ten" +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 +!