rock64|rk3328|slackware|4.4.126

      1 mon ago

   Orange Pi Plus 2E|slackware|4.14.30

      2 mon ago

   rock64 | rk3328 | slackware-current

      4 mon ago

   Orange Pi Plus 2E | slackware | 4.14.

      6 mon ago

    firefly-rk3399 | X.Org | accelerati

      10 mon ago

    firefly-rk3288 | turbo-mode

      1 year ago

   firefly-rk3288 | 4.4.50 | slackware

      1 year ago

   upstream | virualbox

      1 year ago

   get_version | git | mercurial

      1 year ago

   slackware | rc.zram

      1 year ago

embedded link

get_version | git | mercurial

  07 фев 2017 20:05:21      0.32 kb      never
raw

  Bash


#!/usr/bin/bash

if [[ -z "$1" ]]; then
    exit
fi

# Git
git_pkgver() {
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

# Mercurial
hg_pkgver() {
  printf "r%s.%s" "$(hg identify -n)" "$(hg identify -i)"
}