Skip to content

Commit

Permalink
Merge pull request #61 from bquilain/nuPRISM/develop
Browse files Browse the repository at this point in the history
bquilain/hybridPMT (HK) merge to nuPRISM (IWCD) repo
  • Loading branch information
pdeperio authored Jun 3, 2021
2 parents 3c883c4 + 3ea571d commit 9a6e0c9
Show file tree
Hide file tree
Showing 94 changed files with 9,891 additions and 1,932 deletions.
11 changes: 8 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# GNU make and CMake in-place build results to ignore
WCSimRootDict.cxx
WCSimRootDict.h
*WCSimRootDict*
!src/*WCSimRootDict*
libWCSim.a
libWCSimRoot.so
libWCSimRoot.*
make.rootcint.result
make.result
make.out.txt
Expand Down Expand Up @@ -36,3 +36,8 @@ geofile.txt

## compiled python scripts to ignore
*.pyc

## ignore solar
data_solar/
include/WCSimGenerator_Solar.hh
src/WCSimGenerator_Solar.cc
70 changes: 65 additions & 5 deletions CMakeLists.txt
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
## Based on CMakeLists.txt from AnaEx02 in examples/extended of Geant4.9.6 ##
## Modified for ROOT6 support on 2020/11/26 by Guillaume Pronost
#----------------------------------------------------------------------------
# Setup the project
cmake_minimum_required(VERSION 2.8.10 FATAL_ERROR)
Expand All @@ -13,12 +14,14 @@ endif()
# Find ROOT (required package) in CONFIG mode. Looking for ROOTConfig.cmake.
# Crucial for loading the proper definitions!
#
find_package(ROOT CONFIG REQUIRED)
find_package(ROOT COMPONENTS CONFIG REQUIRED)
if(NOT ROOT_FOUND)
message(STATUS "ROOT package not found.")
return()
endif()

message(STATUS "ROOT VERSION ${ROOT_VERSION}")

## Load macros: need to compile ROOT through cmake first and execute bin/thisroot.sh
include(${ROOT_USE_FILE})

Expand All @@ -27,7 +30,7 @@ include(${ROOT_USE_FILE})
# ## NOT NEEDED FOR DICT
include_directories(${PROJECT_SOURCE_DIR}/include
${Geant4_INCLUDE_DIR}
${ROOT_INCLUDE_DIR})
${ROOT_INCLUDE_DIRS})

#----------------------------------------------------------------------------
# Add libraries: need to compile the Dict before linking WCSim !!
Expand All @@ -36,14 +39,63 @@ include_directories(${PROJECT_SOURCE_DIR}/include

## WCSimRootDict.cxx regeneration by rootcint
## Use ROOT 5.34.32 as some issues with PARSE_ARGUMENTS were found in older ROOT versions (ROOT 5.34.11)
ROOT_GENERATE_DICTIONARY(WCSimRootDict ${CMAKE_CURRENT_SOURCE_DIR}/include/WCSimRootEvent.hh ${CMAKE_CURRENT_SOURCE_DIR}/include/WCSimRootGeom.hh ${CMAKE_CURRENT_SOURCE_DIR}/include/WCSimPmtInfo.hh ${CMAKE_CURRENT_SOURCE_DIR}/include/WCSimEnumerations.hh ${CMAKE_CURRENT_SOURCE_DIR}/include/WCSimRootOptions.hh ${CMAKE_CURRENT_SOURCE_DIR}/include/TJNuBeamFlux.hh ${CMAKE_CURRENT_SOURCE_DIR}/include/TNRooTrackerVtx.hh LINKDEF ${CMAKE_CURRENT_SOURCE_DIR}/include/WCSimRootLinkDef.hh)
if ( ${ROOT_VERSION} GREATER_EQUAL 6 )
# ROOT6 doesn't accept '/' in target and header names, use include_directories instead
# and move the dict source after
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)
ROOT_GENERATE_DICTIONARY(WCSimRootDict
WCSimRootEvent.hh
WCSimRootGeom.hh
WCSimPmtInfo.hh
WCSimEnumerations.hh
WCSimRootOptions.hh
TJNuBeamFlux.hh
TNRooTrackerVtx.hh
WCSimRootTools.hh
LINKDEF ${CMAKE_CURRENT_SOURCE_DIR}/include/WCSimRootLinkDef.hh)

else()
# ROOT5 need the full path
ROOT_GENERATE_DICTIONARY(WCSimRootDict
${CMAKE_CURRENT_SOURCE_DIR}/include/WCSimRootEvent.hh
${CMAKE_CURRENT_SOURCE_DIR}/include/WCSimRootGeom.hh
${CMAKE_CURRENT_SOURCE_DIR}/include/WCSimPmtInfo.hh
${CMAKE_CURRENT_SOURCE_DIR}/include/WCSimEnumerations.hh
${CMAKE_CURRENT_SOURCE_DIR}/include/WCSimRootOptions.hh
${CMAKE_CURRENT_SOURCE_DIR}/include/TJNuBeamFlux.hh
${CMAKE_CURRENT_SOURCE_DIR}/include/TNRooTrackerVtx.hh
${CMAKE_CURRENT_SOURCE_DIR}/include/WCSimRootTools.hh
LINKDEF ${CMAKE_CURRENT_SOURCE_DIR}/include/WCSimRootLinkDef.hh)

endif()




## Crucial for reading ROOT classes: make shared object library
add_library(WCSimRoot SHARED ./src/WCSimRootEvent.cc ./src/WCSimRootGeom.cc ./src/WCSimPmtInfo.cc ./src/WCSimEnumerations.cc ./src/WCSimRootOptions.cc ./src/TJNuBeamFlux.cc ./src/TNRooTrackerVtx.cc WCSimRootDict.cxx)
add_library(WCSimRoot SHARED
./src/WCSimRootEvent.cc
./src/WCSimRootGeom.cc
./src/WCSimPmtInfo.cc
./src/WCSimEnumerations.cc
./src/WCSimRootOptions.cc
./src/TJNuBeamFlux.cc
./src/TNRooTrackerVtx.cc
./src/WCSimRootTools.cc
WCSimRootDict.cxx)
target_link_libraries(WCSimRoot ${ROOT_LIBRARIES})


# Create libWCSimRootDict.so (needed for ROOT6)
add_custom_command(TARGET WCSimRoot
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E create_symlink libWCSimRoot.so libWCSimRootDict.so)

if ( ${ROOT_VERSION} LESS 6 )
# Create Rootmap (not automatically done for ROOT5)
add_custom_command(TARGET WCSimRoot
POST_BUILD
COMMAND rlibmap -o ${CMAKE_CURRENT_BINARY_DIR}/libWCSimRoot.rootmap -l ${CMAKE_CURRENT_BINARY_DIR}/libWCSimRoot.so -c ${CMAKE_CURRENT_SOURCE_DIR}/include/WCSimRootLinkDef.hh)
endif()

#----------------------------------------------------------------------------
# Find Geant4 package, activating all available UI and Vis drivers by default
Expand Down Expand Up @@ -103,10 +155,18 @@ if (NOT (PROJECT_SOURCE_DIR STREQUAL PROJECT_BINARY_DIR))
# file(COPY ${PROJECT_SOURCE_DIR}/include DESTINATION ${PROJECT_BINARY_DIR} USE_SOURCE_PERMISSIONS)
set(WCSIM_FILES
WCSim.mac
biasprofile.dat
tuningNominal.mac
WCSim_hybrid.mac
WCSim_hybrid.sh
include/TJNuBeamFlux.hh
include/TNRooTrackerVtx.hh
include/WCSimEnumerations.hh
include/WCSimPmtInfo.hh
include/WCSimRootEvent.hh
include/WCSimRootGeom.hh
include/WCSimRootOptions.hh
include/WCSimRootTools.hh
)
foreach(_file ${WCSIM_FILES})
configure_file(
Expand Down
25 changes: 19 additions & 6 deletions GNUmakefile_full
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ endif
ROOTCFLAGS := $(shell root-config --cflags) -DUSE_ROOT -fPIC
ROOTLIBS := $(shell root-config --libs)

#LIBNAME := /home/bquilain/nuPRISM/WCSim/WCSim
LIBNAME := WCSim

# NOTE: Geant4.7.0 changes the way Maximum Step size is defined.
Expand All @@ -35,7 +36,8 @@ ifdef GCCVERS296
CPPFLAGS += -DUSE_STRSTREAM
endif

CPPFLAGS += -I$(ROOTSYS)/include $(ROOTCFLAGS) -std=c++0x ##for unordered_map
#CPPFLAGS += -I$(ROOTSYS)/include $(ROOTCFLAGS) -std=c++0x ##for unordered_map
CPPFLAGS += -I$(ROOTSYS)/include $(ROOTCFLAGS) -std=c++11 ##for unordered_map
EXTRALIBS += $(ROOTLIBS)

EXTRA_LINK_DEPENDENCIES :=
Expand All @@ -51,15 +53,15 @@ endif
CPPFLAGS += -DGIT_HASH=\"$(shell git describe --always --long --tags --dirty)\"

.PHONY: all
all: rootcint shared libWCSim.a lib bin
all: rootcint movedict shared libWCSim.a lib bin

# Note dependencies not yet set up right yet

ROOTSO := libWCSimRoot.so

ROOTSRC := ./src/WCSimRootEvent.cc ./include/WCSimRootEvent.hh ./src/WCSimRootGeom.cc ./include/WCSimRootGeom.hh ./include/WCSimPmtInfo.hh ./src/WCSimEnumerations.cc ./include/WCSimEnumerations.hh ./src/WCSimRootOptions.cc ./include/WCSimRootOptions.hh ./src/TJNuBeamFlux.cc ./include/TJNuBeamFlux.hh ./src/TNRooTrackerVtx.cc ./include/TNRooTrackerVtx.hh ./include/WCSimRootLinkDef.hh
ROOTSRC := ./src/WCSimRootEvent.cc ./include/WCSimRootEvent.hh ./src/WCSimRootGeom.cc ./include/WCSimRootGeom.hh ./include/WCSimPmtInfo.hh ./src/WCSimEnumerations.cc ./include/WCSimEnumerations.hh ./src/WCSimRootOptions.cc ./include/WCSimRootOptions.hh ./src/TJNuBeamFlux.cc ./include/TJNuBeamFlux.hh ./src/TNRooTrackerVtx.cc ./include/TNRooTrackerVtx.hh ./src/WCSimRootTools.cc ./include/WCSimRootTools.hh ./include/WCSimRootLinkDef.hh

ROOTOBJS := $(G4WORKDIR)/tmp/$(G4SYSTEM)/WCSim/WCSimRootEvent.o $(G4WORKDIR)/tmp/$(G4SYSTEM)/WCSim/WCSimRootGeom.o $(G4WORKDIR)/tmp/$(G4SYSTEM)/WCSim/WCSimPmtInfo.o $(G4WORKDIR)/tmp/$(G4SYSTEM)/WCSim/WCSimEnumerations.o $(G4WORKDIR)/tmp/$(G4SYSTEM)/WCSim/WCSimRootOptions.o $(G4WORKDIR)/tmp/$(G4SYSTEM)/WCSim/TNRooTrackerVtx.o $(G4WORKDIR)/tmp/$(G4SYSTEM)/WCSim/TJNuBeamFlux.o $(G4WORKDIR)/tmp/$(G4SYSTEM)/WCSim/WCSimRootDict.o
ROOTOBJS := $(G4WORKDIR)/tmp/$(G4SYSTEM)/WCSim/WCSimRootEvent.o $(G4WORKDIR)/tmp/$(G4SYSTEM)/WCSim/WCSimRootGeom.o $(G4WORKDIR)/tmp/$(G4SYSTEM)/WCSim/WCSimPmtInfo.o $(G4WORKDIR)/tmp/$(G4SYSTEM)/WCSim/WCSimEnumerations.o $(G4WORKDIR)/tmp/$(G4SYSTEM)/WCSim/WCSimRootOptions.o $(G4WORKDIR)/tmp/$(G4SYSTEM)/WCSim/TNRooTrackerVtx.o $(G4WORKDIR)/tmp/$(G4SYSTEM)/WCSim/TJNuBeamFlux.o $(G4WORKDIR)/tmp/$(G4SYSTEM)/WCSim/WCSimRootTools.o $(G4WORKDIR)/tmp/$(G4SYSTEM)/WCSim/WCSimRootDict.o

shared: $(ROOTSRC) $(ROOTOBJS)
g++ -shared -O $(ROOTOBJS) -o $(ROOTSO) $(ROOTLIBS)
Expand All @@ -69,10 +71,13 @@ libWCSim.a : $(ROOTOBJS)
ar clq $@ $(ROOTOBJS)

./WCSimRootDict.cxx : $(ROOTSRC)
rootcint -f ./WCSimRootDict.cxx -c -I./include -I$(shell root-config --incdir) WCSimRootEvent.hh WCSimRootGeom.hh WCSimPmtInfo.hh WCSimEnumerations.hh WCSimRootOptions.hh TJNuBeamFlux.hh TNRooTrackerVtx.hh WCSimRootLinkDef.hh
rootcint -f ./WCSimRootDict.cxx -c -I./include -I$(shell root-config --incdir) WCSimRootEvent.hh WCSimRootGeom.hh WCSimPmtInfo.hh WCSimEnumerations.hh WCSimRootOptions.hh TJNuBeamFlux.hh TNRooTrackerVtx.hh WCSimRootTools.hh WCSimRootLinkDef.hh

rootcint: ./WCSimRootDict.cxx

movedict: rootcint
if [ -f "./WCSimRootDict_rdict.pcm" ]; then cp -f ./WCSimRootDict_rdict.pcm ${G4WORKDIR}/tmp/${G4SYSTEM}/WCSim/; fi

doxy:
@if [ ${DOXYGEN_EXISTS} = 1 ]; \
then \
Expand All @@ -83,14 +88,22 @@ doxy:

clean_wcsim:
echo $(G4WORKDIR);
$(RM) -r $(G4WORKDIR); $(RM) *.o *.a *.so *~ */*~ ./WCSimRootDict.*
$(RM) -r $(G4WORKDIR); $(RM) *.o *.a *.so *~ */*~ ./WCSimRootDict*
@if [ -d "doc/doxygen" ]; \
then \
rm -r doc/doxygen; \
fi

#Clean with :: will be executed before the normal G4 clean
#RootDict may lead to some troubles if not clean before checking dependencies
clean::
@echo "Cleaning RootDict and libWCSim ..."
@rm -f ./WCSimRootDict* libWCSim*

include $(G4INSTALL)/config/binmake.gmk

$(G4TMPDIR)/obj.last: $(G4TMPDIR)/WCSimRootDict.o # needed for the "lib" target

$(G4TMPDIR)/%.o: %.cxx
@echo Compiling $*.cxx ...
@if [ ! -d $(G4TMPDIR) ] ; then echo mkdir -p $(G4TMPDIR) ; mkdir -p $(G4TMPDIR) ; fi
Expand Down
9 changes: 4 additions & 5 deletions GNUmakefile_root
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,9 @@ G4TMPDIR := $(G4WORKDIR)/tmp/$(G4SYSTEM)/WCSim

ROOTSO := libWCSimRoot.so

ROOTSRC := ./src/WCSimRootEvent.cc ./include/WCSimRootEvent.hh ./src/WCSimRootGeom.cc ./include/WCSimRootGeom.hh ./include/WCSimPmtInfo.hh ./src/WCSimEnumerations.cc ./include/WCSimEnumerations.hh ./src/WCSimRootOptions.cc ./include/WCSimRootOptions.hh ./include/WCSimRootLinkDef.hh

ROOTOBJS := $(G4WORKDIR)/tmp/$(G4SYSTEM)/WCSim/WCSimRootEvent.o $(G4WORKDIR)/tmp/$(G4SYSTEM)/WCSim/WCSimRootGeom.o $(G4WORKDIR)/tmp/$(G4SYSTEM)/WCSim/WCSimPmtInfo.o $(G4WORKDIR)/tmp/$(G4SYSTEM)/WCSim/WCSimEnumerations.o $(G4WORKDIR)/tmp/$(G4SYSTEM)/WCSim/WCSimRootOptions.o $(G4WORKDIR)/tmp/$(G4SYSTEM)/WCSim/WCSim
ROOTSRC := ./src/WCSimRootEvent.cc ./include/WCSimRootEvent.hh ./src/WCSimRootGeom.cc ./include/WCSimRootGeom.hh ./include/WCSimPmtInfo.hh ./src/WCSimEnumerations.cc ./include/WCSimEnumerations.hh ./src/WCSimRootOptions.cc ./include/WCSimRootOptions.hh ./src/TJNuBeamFlux.cc ./include/TJNuBeamFlux.hh ./src/TNRooTrackerVtx.cc ./include/TNRooTrackerVtx.hh ./src/WCSimRootTools.cc ./include/WCSimRootTools.hh ./include/WCSimRootLinkDef.hh

ROOTOBJS := $(G4WORKDIR)/tmp/$(G4SYSTEM)/WCSim/WCSimRootEvent.o $(G4WORKDIR)/tmp/$(G4SYSTEM)/WCSim/WCSimRootGeom.o $(G4WORKDIR)/tmp/$(G4SYSTEM)/WCSim/WCSimPmtInfo.o $(G4WORKDIR)/tmp/$(G4SYSTEM)/WCSim/WCSimEnumerations.o $(G4WORKDIR)/tmp/$(G4SYSTEM)/WCSim/WCSimRootOptions.o $(G4WORKDIR)/tmp/$(G4SYSTEM)/WCSim/TNRooTrackerVtx.o $(G4WORKDIR)/tmp/$(G4SYSTEM)/WCSim/TJNuBeamFlux.o $(G4WORKDIR)/tmp/$(G4SYSTEM)/WCSim/WCSimRootTools.o $(G4WORKDIR)/tmp/$(G4SYSTEM)/WCSim/WCSimRootDict.o



Expand All @@ -48,7 +47,7 @@ libWCSimRoot.so : $(ROOTOBJS)

./WCSimRootDict.cxx : $(ROOTSRC)
@echo Compiling rootcint ...
rootcint -f ./WCSimRootDict.cxx -c -I./include -I$(shell root-config --incdir) WCSimRootEvent.hh WCSimRootGeom.hh WCSimPmtInfo.hh WCSimEnumerations.hh WCSimRootOptions.hh WCSimRootLinkDef.hh
rootcint -f ./WCSimRootDict.cxx -c -I./include -I$(shell root-config --incdir) WCSimRootEvent.hh WCSimRootGeom.hh WCSimPmtInfo.hh WCSimEnumerations.hh WCSimRootOptions.hh TJNuBeamFlux.hh TNRooTrackerVtx.hh WCSimRootTools.hh WCSimRootLinkDef.hh

rootcint: ./WCSimRootDict.cxx

Expand All @@ -66,5 +65,5 @@ $(G4TMPDIR)/%.o: %.cxx

clean :
@rm -f $(G4TMPDIR)/*.o
@rm -f ./WCSimRootDict.*
@rm -f ./WCSimRootDict*

Empty file modified README.ROOT
100644 → 100755
Empty file.
58 changes: 50 additions & 8 deletions README.md
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Welcome to WCSim
# Welcome to WCSim

WCSim is a very flexible GEANT4 based program for developing and
simulating large water Cherenkov detectors.
Expand All @@ -21,14 +21,18 @@ https://lists.phy.duke.edu/mailman/listinfo/wcsim-git

You can follow issues/requests etc by watching the GitHub respository.

## Current notes and how to build
# Current notes and how to build

Build Instructions:
## Build Instructions:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This compilation method is not advised, CMake should be prefered
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

You should have a recent and working version of ROOT and GEANT4.
(Known to work with GEANT 4.10.1p03 and ROOT v5.28.00) You also need all of the G4
(Known to work with GEANT 4.10.03p3 and ROOT v5.28.00) You also need all of the G4
data files including hadron xsecs etc. Those are the only
requirements. The code should work with gcc 4.4.7. For v1.6.0 and earlier, use GEANT 4.9.4.p01.
requirements. The code should work with gcc 4.4.7. For v1.6.0 and earlier, use GEANT 4.10.02+.

To compile:
* make clean
Expand All @@ -42,7 +46,7 @@ If you want to use these libraries with an external program then also do:
More detailed information about the simulation is available in
doc/DetectorDocumentation.pdf.

Build Instructions using CMake:
## Build Instructions using CMake:

CMake is cross-platform software for managing the build process in
a compiler-independent way (cmake.org).
Expand All @@ -52,18 +56,19 @@ builds through CMake from 4.9.4 onwards (http://geant4.web.cern.ch/geant4/suppor
Using cmake, builds and source code need to well separated and make
it easier to build many versions of the same software.


A recommended way to set up the directory structure in your own
preferred WCSIM_HOME:
- ${WCSIM_HOME}/WCSim : contains the src dir, typically the cloned or
unzipped code from GitHub
- ${WCSIM_HOME}/WCSim_build : contains directories for each build, eg.
- ${WCSIM_HOME}/WCSim-build : contains directories for each build, eg.
for each branch you want to test or for different releases, comparing
debugged versions, etc.
This directory will contain the executable, the example macros and
library for ROOT.

To compile you need to have CMakeLists.txt in the WCSim source dir.
* mkdir ${WCSIM_HOME}/WCSim_build/mydir ; cd ${WCSIM_HOME}/WCSim_build/mydir
* mkdir ${WCSIM_HOME}/WCSim-build/mydir ; cd ${WCSIM_HOME}/WCSim-build/mydir
* Set up the Geant4_Dir: export Geant4_DIR=${HOME}/Geant4/install/geant4.9.6.p04
(from the make install phase of Geant4)
* cmake ../../WCSim : this executes the commands in CMakeLists.txt and generates
Expand All @@ -82,6 +87,27 @@ Useful cmake commands:
* make edit_cache : customize the build.
* make rebuild_cache : redo the cmake phase.

## Build with CMake on sukap:

A script allowing to build WCSim with CMake on sukap is available:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./make_sukap.sh
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This script will read the current WCSim directory name and create a directory to hold the different cmake builds.
For example, in case your current WCSim directory name is 'WCSim', it will create a '../WCSim-build' directory.
It will then create a directory for your current branch which will have the name of the current branch.

For example, in case of this WCSim repository, you will have:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
WCSim
WCSim-dir
WCSim-dir/hybridPMT
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Note: the script env_sukap.sh provide PATH toward Geant4 and ROOT directories on sukap. However, the current ROOT directory is pointing to Guillaume Pronost space. The reason is the default ROOT 5.34 available on sukap is not compatible with CMake compilation. This should be modify in the future.



## Color Convention for visualization used in WCSimVismanager.cc
Expand All @@ -98,3 +124,19 @@ Useful cmake commands:
```
WCSim development is supported by the United States National Science Foundation.
```

#######################################
HYBRID configuration (B.Q)
#######################################
Requirements for this version:
-ROOT v5r34p36 or v5r34p38. Others might work but have not been tested (all v5r34 probably works). ROOT v6 does not work so far.
-GEANT4 v10r02 or later. Test with v10r03p03.
-cmake should be installed. The installation needs to be done with cmake since the Rn background generator has been added.

0. The environment variable WCSIMDIR should be defined as your WCSIM directory (not the build one).
export WCSIMDIR=`pwd`
1. Please install using cmake as detailed earlier in this README.md.
2. First running of hybrid configuration: please use WCSim_hybrid.sh
3. Readout the output: a script exists in sample-root-scripts, named AnalyzeWSHierarchy.c
a. Compile it using Makefile in sample-root-scripts (make)
b. Execute it using Analyzer.sh in sample-root-scripts (./Analyzer.sh)
13 changes: 13 additions & 0 deletions SetupGitHub.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

#Check if connected to https or ssh
IsHTTPS=$(git remote -v | grep "https" | wc -l)

if [ "${IsHTTPS}" -gt 0 ] ; then
echo "Adding https Upstream to bquilain/WCSim"
git remote add upstream https://github.com/bquilain/WCSim
else
echo "Adding ssh Upstream to bquilain/WCSim"
git remote add upstream [email protected]:bquilain/WCSim.git
fi

Loading

0 comments on commit 9a6e0c9

Please sign in to comment.