Hello!

I would like to introduce my project to the AUR mailing list. I am about to 
upload a PKGBUILD of a `datediff.sh' script which does calendrical calculations 
with shell built-ins, and has got some other few functions as well.

Would installing the script as `datediff.sh' to /usr/bin be standard?

Suggestions are appreciated.  I am thinking about making a man page, that is 
why one line in package() is still commented out - but may use it in the future.


    # Maintainer: Jamil SN <jamilbi...@gmail.com>
    pkgname='datediff.sh'
    pkgbase='shellDatediff'
    pkgver=0.23.4
    pkgrel=1
    #epoch=
    pkgdesc='Calculate time differences with Ksh, Bash, and Zsh builtins. Check 
moon phases, Easter dates and next Friday 13th.'
    arch=('any')
    url="https://github.com/mountaineerbr/${pkgbase}";
    license=('GPL')
    depends=('bash')
    optdepends=(
        'date: convert input to iso-8601'
        'bc: fractional time units (bash)'
    )
    provides=('datediff.sh')
    #conflicts=('datediff.sh')
source=("https://github.com/mountaineerbr/${pkgbase}/releases/download/v${pkgver}/${pkgbase}.tar.zst";)
    md5sums=('949f88594bba40f7a62ff65e6dda7cf8')


    prepare() {
        cd "${pkgbase}-${pkgver}"

        #check defaults interpreter
        if command -v ksh
        then     return 0
        elif command -v bash
        then     _sh=bash
        elif command -v zsh
        then     _sh=zsh
        else     return 0
        fi

        sed -i -e "1s/ksh/${_sh}/" "${pkgname}"
    }

    package() {
        cd "${pkgbase}-${pkgver}"

        #install -Dm644 "${pkgname}.1" 
"${pkgdir}/usr/local/man/man1/${pkgname}.1"
        install -Dm755 "${pkgname}" "${pkgdir}/usr/bin/${pkgname}"
    }

Reply via email to