mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-25 23:49:35 -05:00
a4f6500772
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8118 b45a01b8-16f6-495d-af2f-9b41ad6348cc
31 lines
1.1 KiB
Bash
Executable File
31 lines
1.1 KiB
Bash
Executable File
#!/bin/bash
|
|
#check if we're on *nix system
|
|
#write the version.html file
|
|
|
|
#don't exit even if a command fails
|
|
set +e
|
|
|
|
if (ls &> /dev/null); then
|
|
echo "Retroshare Gui version : " > gui/help/version.html
|
|
if ( /usr/bin/git log -n 1 &> /dev/null); then
|
|
#retrieve git information
|
|
echo "Git version : $(git status | grep branch | cut -c 3-) $(git log -n 1 | grep commit)" >> gui/help/version.html
|
|
fi
|
|
if ( /usr/bin/git log -n 1 | grep svn &> /dev/null); then
|
|
#retrieve git svn information
|
|
echo "Svn version : $(git log -n 1 | awk '/svn/ {print $2}' | head -1)" >> gui/help/version.html
|
|
elif ( /usr/bin/git log -n 10 | grep svn &> /dev/null); then
|
|
#retrieve git svn information
|
|
echo "Svn closest version : $(git log -n 10 | awk '/svn/ {print $2}' | head -1)" >> gui/help/version.html
|
|
fi
|
|
|
|
if ( /usr/bin/svn info &> /dev/null); then
|
|
echo "Svn version : $(svn info | awk '/^Revision:/ {print $NF}')" >> gui/help/version.html
|
|
fi
|
|
date >> gui/help/version.html
|
|
echo "" >> gui/help/version.html
|
|
echo "" >> gui/help/version.html
|
|
fi
|
|
echo "version_detail.sh scripts finished"
|
|
exit 0
|