aboutsummaryrefslogtreecommitdiff
path: root/lib.sh
blob: 9f4e0f312e33a6803bb3670d61f14ff32440fb23 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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 ; )
   )
}
bgstack15