summarylogtreecommitdiffstats
path: root/geant4-piidata.install
diff options
context:
space:
mode:
authorL.G. Sarmiento2020-08-28 11:40:34 +0200
committerL.G. Sarmiento2020-08-28 11:40:34 +0200
commit05dcb558efb394edc830822bd67eae5ed04ee042 (patch)
tree3f0d3e67ce0b9d09a923842b646b1bbd3282e196 /geant4-piidata.install
parent48c443aa946f6ff5f96ce40166b808e81ecb3137 (diff)
downloadaur-05dcb558efb394edc830822bd67eae5ed04ee042.tar.gz
geant4 is now optdepends
Diffstat (limited to 'geant4-piidata.install')
-rw-r--r--geant4-piidata.install21
1 files changed, 3 insertions, 18 deletions
diff --git a/geant4-piidata.install b/geant4-piidata.install
index 01ad937a826..71396c3c5f1 100644
--- a/geant4-piidata.install
+++ b/geant4-piidata.install
@@ -1,34 +1,19 @@
#!/bin/sh
_varname='G4PIIDATA'
-_packagename='geant4-piidata'
-_foldername='G4PII'
-
-_add() {
- _dataversion=${1}
- echo "export ${_varname}=/usr/share/${_packagename}/${_foldername}${_dataversion}" >> /etc/profile.d/geant4.sh
- echo "setenv ${_varname} /usr/share/${_packagename}/${_foldername}${_dataversion}" >> /etc/profile.d/geant4.csh
-}
_remove() {
- sed -i "/${_varname}/d" /etc/profile.d/geant4.sh
- sed -i "/${_varname}/d" /etc/profile.d/geant4.csh
+ ## from the time where this variables where stored in this one script
+ sed -n -i "/${_varname}/d" /etc/profile.d/geant4.sh 2>/dev/null
+ sed -n -i "/${_varname}/d" /etc/profile.d/geant4.csh 2>/dev/null
}
pre_install() {
_remove
}
-post_install() {
- _version=${1::-2}
- _add ${_version}
-}
pre_upgrade() {
_remove
}
-post_upgrade() {
- _version=${1::-2}
- _add ${_version}
-}
pre_remove() {
_remove
}