# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4

PortSystem          1.0
PortGroup           github 1.0

github.setup        Bhupesh-V ugit 5.9 v
github.tarball_from archive
revision            0

homepage            https://bhupesh.me/undo-your-last-git-mistake-with-ugit/

description         ${name} helps undo git commands

long_description    \
    {*}${description}. ${name}\/git-undo supports undoing the following \
    operations, some are a WIP: git commit, git add, git push, git branch -D \
    \(branch delete\), git pull, git reset, git tag -d \(tag delete\), git \
    stash apply, git stash pop\/drop\/clear, accidental file delete \(Restore \
    a deleted file after a commit\), \(Restore\) a file to a previous \
    version, git merge, git cherry-pick, and git tag.

categories          devel
platforms           any
license             MIT
maintainers         {gmail.com:herby.gillot @herbygillot} \
                    openmaintainer
supported_archs     noarch

checksums           rmd160  a0570ab397bb3319963b71bf769038bb3f6dbc9b \
                    sha256  f93d9d4bb0d6fd676704e45733190413885c859ff2807b84cc8113bf674fc063 \
                    size    20928

depends_lib-append  port:bash
depends_run-append  bin:git:git \
                    port:fzf

use_configure       no

build {}

patch {
    reinplace -E "s|^#!/usr/bin/env bash$|#!${prefix}/bin/bash|g" \
        ${worksrcpath}/${name}
}

destroot {
    copy ${worksrcpath}/${name} ${destroot}${prefix}/bin/
}
