File: spec_tmpl.sh

package info (click to toggle)
libmodulemd 2.15.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 5,152 kB
  • sloc: ansic: 37,845; python: 3,236; xml: 1,739; sh: 377; makefile: 42
file content (14 lines) | stat: -rwxr-xr-x 269 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/usr/bin/env bash

function main {
    local template version release
    local "${@}"

    datetime=$(date +%Y%m%d%H%M%S)
    release=${release:-0.$datetime%\{?dist\}}

    sed -e "s/@VERSION@/$version/" \
        -e "s/@RELEASE@/$release/" $template
}

main "${@}"