X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=src%2Fgen_nsd_pkg.sh;fp=src%2Fgen_nsd_pkg.sh;h=0000000000000000000000000000000000000000;hb=d21e9d06f4b662d6a7166c4715875fb41cd561ff;hp=07761d2f62abb83db78ce7a916ed33218a77dd92;hpb=98bac2f1daa9eadcc0a95e73df251483e7522d5d;p=osm%2Fdevops.git diff --git a/src/gen_nsd_pkg.sh b/src/gen_nsd_pkg.sh deleted file mode 100755 index 07761d2f..00000000 --- a/src/gen_nsd_pkg.sh +++ /dev/null @@ -1,65 +0,0 @@ -#!/bin/bash -# -# Copyright 2016 RIFT.IO Inc -# -# 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. -# -# Author(s): Austin Cormier -# Creation Date: 2016/05/23 -# - -# Generates a NSD descriptor package from a source directory -# Usage: -# gen_nsd_pkg.sh - -set -o nounset - -if [ $# -ne 2 ]; then - echo "Error: Must provide 2 parameters" >@2 - exit 1 -fi - -pkg_src_dir="$1" -pkg_dest_dir="$2" - -if [ ! -e ${pkg_src_dir} ]; then - echo "Error: ${pkg_src_dir} does not exist" - exit 1 -fi - -if [ ! -e ${pkg_dest_dir} ]; then - echo "Error: ${pkg_src_dir} does not exist" - exit 1 -fi - -echo "Generating package in directory: ${pkg_dest_dir}" - -# Create any missing directories/files so each package has -# a complete hierachy -nsd_dirs=( ns_config vnf_config icons scripts ) -nsd_files=( README ) - -nsd_dir="${pkg_src_dir}" -echo $(pwd) - -mkdir -p "${pkg_dest_dir}" -cp -rf ${nsd_dir}/* "${pkg_dest_dir}" -for sub_dir in ${nsd_dirs[@]}; do - dir_path=${pkg_dest_dir}/${sub_dir} - mkdir -p ${dir_path} -done - -for file in ${nsd_files[@]}; do - file_path=${pkg_dest_dir}/${file} - touch ${file_path} -done