From 0d737af02d0b27bb4d9fbb453f09c293036d1a39 Mon Sep 17 00:00:00 2001 From: "B. Stack" Date: Tue, 17 May 2022 21:32:43 -0400 Subject: initial commit --- lib.sh | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 lib.sh (limited to 'lib.sh') diff --git a/lib.sh b/lib.sh new file mode 100644 index 0000000..9f4e0f3 --- /dev/null +++ b/lib.sh @@ -0,0 +1,31 @@ +#!/bin/sh +# File: lib.sh +# Author: bgstack15 +# SPDX-License-Identifier: GPL-3.0 +# Startdate: 2022-05-17 +# Title: Library for build-radicale-centos7 +# Project: build-radicale-centos7 +# Purpose: library of common functions and variables +# History: +# Usage: dot-sourced by other scripts here +# Reference: +# Improve: +# Dependencies: +# Documentation: +# README.md + +WORKDIR=~/dev2 +FEDORA_VER=f36 +# COPR username comes from ~/.config/copr auth file +COPR_REPO=radicale-el7 + +get_latest() { + # call: get_latest ~/rpmbuild/SRPMS "python-nose*.src.rpm" + # returns: most-recently-modified python-nose*.src.rpm file + ___gl_path="${1}" + ___gl_pattern="${2}" + ( + cd "${___gl_path}" + basename $( find . -iname "${___gl_pattern}" -exec ls -1t {} + 2>/dev/null | head -n1 ; ) + ) +} -- cgit