Created
March 21, 2017 13:12
-
-
Save xyproto/e0ac33a17365c9997c91df27d89e0072 to your computer and use it in GitHub Desktop.
First attempt at command line for extracting the latest tag's git hash from a PKGBUILD file that uses git
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Try to extract the latest tag's commit hash | |
git ls-remote --tags $(grep source= PKGBUILD | cut -d\" -f2 | cut -d\# -f1 | cut -d+ -f2 | sed "s/\$pkgname/$(grep pkgname= PKGBUILD | cut -d= -f2)/g") | tail -1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment