simhadteam team mailing list archive
-
simhadteam team
-
Mailing list archive
-
Message #00020
[Branch ~simhadteam/simulationshadrontherapie/G4LPC] Rev 20: Ajout du script permettant d'obtenir la version de GEANT4 utilisee.
------------------------------------------------------------
revno: 20
committer: Daniel Cussol <cussol@xxxxxxxx>
branch nick: G4LPC
timestamp: Tue 2013-04-30 11:07:28 +0200
message:
Ajout du script permettant d'obtenir la version de GEANT4 utilisee.
added:
GetGeant4Version
--
lp:simulationshadrontherapie/g4lpc
https://code.launchpad.net/~simhadteam/simulationshadrontherapie/G4LPC
Your team Simulateurs pour la Hadronthérapie is subscribed to branch lp:simulationshadrontherapie/g4lpc.
To unsubscribe from this branch go to https://code.launchpad.net/~simhadteam/simulationshadrontherapie/G4LPC/+edit-subscription
=== added file 'GetGeant4Version'
--- GetGeant4Version 1970-01-01 00:00:00 +0000
+++ GetGeant4Version 2013-04-30 09:07:28 +0000
@@ -0,0 +1,23 @@
+#!/bin/csh
+#determination de la version de GEANT4
+set G4version = ""
+if(-e ${G4INCLUDE}/G4Version.hh) then
+ set G4version = `grep "define G4VERSION_NUMBER" ${G4INCLUDE}/G4Version.hh`
+else
+ set G4versionHH = `find ${G4INSTALL}/source/ -name "G4Version.hh"`
+ set G4version = `grep "define G4VERSION_NUMBER" ${G4versionHH}`
+endif
+set G4verMajor = `echo $G4version | awk -F " " '{print int($3/100)}'`
+set G4verMinor = `echo $G4version | awk -F " " '{print int(($3%100)/10)}'`
+set G4verPatch = `echo $G4version | awk -F " " '{print int($3%10)}'`
+
+set G4version = "v4.${G4verMajor}.${G4verMinor}"
+if($G4verPatch > 0) then
+ set G4version = "${G4version}-p"
+ if ($G4verPatch < 10) then
+ set G4version = "${G4version}0"
+ endif
+ set G4version = "${G4version}${G4verPatch}"
+endif
+setenv G4VERSION ${G4version}
+echo "${G4version}"