Add tool upload-installer.sh to upload installer to FTP server 21/11921/3
authorgarciadeblas <gerardo.garciadeblas@telefonica.com>
Fri, 22 Apr 2022 10:15:45 +0000 (12:15 +0200)
committerbeierlm <mark.beierl@canonical.com>
Tue, 17 May 2022 01:33:00 +0000 (03:33 +0200)
Change-Id: I62e9eaeabb915b7b8da01fe1aa65b03fdd1f8619
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
tools/env-ftp [new file with mode: 0644]
tools/upload-installer.sh [new file with mode: 0755]

diff --git a/tools/env-ftp b/tools/env-ftp
new file mode 100644 (file)
index 0000000..fafb2be
--- /dev/null
@@ -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 (executable)
index 0000000..706b752
--- /dev/null
@@ -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
+!