archive-file: cleaner way to get current branch

This commit is contained in:
Nicolai Skogheim 2015-07-25 06:05:37 +02:00
parent 7d1ede1022
commit 95db4e7ad5

View file

@ -1,7 +1,7 @@
#!/usr/bin/env bash
# extract current branch name
BRANCH=$(git name-rev HEAD 2> /dev/null | awk "{ print \$2 }")
BRANCH=$(git rev-parse --abbrev-ref HEAD 2> /dev/null)
# get name of the most top folder of current directory, used for the
# output filename