mirror of https://github.com/phonopy/phonopy.git
16 lines
352 B
Bash
Executable File
16 lines
352 B
Bash
Executable File
#!/bin/bash
|
|
|
|
br=`git branch |tail -n1`
|
|
read o u f <<< `git remote -v |grep origin |grep fetch`
|
|
echo "Repo: $o $u $br"
|
|
git describe --tags --dirty
|
|
TD=`mktemp -d`
|
|
WD=`pwd`
|
|
git clone $u $TD
|
|
cd $TD
|
|
echo $u $br
|
|
git checkout $br
|
|
git describe --tags --dirty | sed -e 's/\([.0-9]*\)-\(.*\)-g.*/\2/' -e 's/^[vr]//g' >$WD/__nanoversion__.txt
|
|
cd $WD
|
|
rm -rf "$TD"
|