From a9f81dd1ae6a35c129590782a277f8047df4e263 Mon Sep 17 00:00:00 2001 From: Tongkun Zhang Date: Tue, 21 Dec 2021 17:42:19 -0500 Subject: [PATCH] Delete shelic --- shelic | 110 --------------------------------------------------------- 1 file changed, 110 deletions(-) delete mode 100644 shelic diff --git a/shelic b/shelic deleted file mode 100644 index 7a4a998..0000000 --- a/shelic +++ /dev/null @@ -1,110 +0,0 @@ -#!/QOpenSys/usr/bin/sh - -# Copyright 2017 S4i Systems 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. - -# -# Simple installer if Relic isn't used -# - -print_help() { - (echo "shelic: Install Relic packages from a shell" - echo - echo "Compiles package from source code into the specified library, using Relic's \`build.txt\` file as a driver. The current directory should first be set to the package directory. If compile errors occur, see spool files for more details." - echo - echo "Note: Not all Relic commands are currently supported." - echo - echo "Usage: shelic library_name" - echo - echo "EXAMPLE" - echo " Compile CRTFRMSTMF package into library BUILDTOOLS." - echo " cd crtfrmstmf && /path/to/shelic buildtools") | fold -s -} >&2 - -# Print a string in upper case -print_upper() { - local string=$(echo "$1" | tr '[:lower:]' '[:upper:]') - echo $string -} - -# Get absolute path -function realpath { - local p=$(cd "$1" && echo "$PWD") - echo "${p}" -} - -# Print the name of this script -script_name() { - echo "${0##*/}" -} - -# Name of Relic build script -buildFile='build.txt' - -# Require one arguments -shift "$(($OPTIND-1))" - -if [ $# -ne 1 ]; then - print_help - exit 1 -fi - -lib=$(print_upper $1) -err=0 - -if [[ "$lib" == "QSYS" ]]; then - echo "$(script_name): Library QSYS is not eligible for installation. Please choose a different library." - exit 1 -fi - -libPath=/QSYS.LIB/${lib}.LIB -if [ ! -d ${libPath} ]; then - echo "$(script_name): Library ${lib} doesn't exist." - exit 1 -fi - -# Verify that Relic build file exists; if not, we're all done. -if [ ! -e "./$buildFile" ]; then - echo "$(script_name): File ${buildFile} not found in current directory; exiting." >&2 - exit 1 -fi - -pkgDir=$(realpath "$(pwd)") - -# Extract `name:` value. -name=$(sed -n -e '/name:/{n;p;}' "$buildFile" | sed -e 's/^[[:space:]]*//' -e 's/ *$//') - -# Substitute in &INTOLIB, &DIR, and &NAME values. -sed -e '1,/build:/d' -e '/^ *$/d' -e "s/&INTOLIB/${lib}/g" -e "s|&DIR|${pkgDir}|g" -e "s/&NAME/${name}/g" "$buildFile" | -{ - while read cmd; do - echo - echo "==> ${cmd}" - system -s "${cmd}" /dev/null -# qsh_out -c "system -kq \"${cmd}\"" - if [ $? -ne 0 ]; then - err=1 - fi - done - - if [ $err -ne 0 ]; then - echo - echo "$(script_name): One or more errors occurred. See spool files for more details." - else - echo - echo "$(script_name): Done" - fi -} - -exit 0 \ No newline at end of file