-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathinitial-setup.sh
More file actions
38 lines (34 loc) · 993 Bytes
/
initial-setup.sh
File metadata and controls
38 lines (34 loc) · 993 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#! /usr/bin/bash
cmssw_version=$1
run=${2:-}
if [[ ! -z $(ls | grep "genproductions") ]]; then
echo "genproductions already installed."
sleep 2
else
echo "genproductions not found. Cloning."
sleep 2
git clone git@github.com:cms-sw/genproductions.git
fi
if [[ ! -z $(ls | grep "$cmssw_version") ]]; then
echo "$cmssw_version already installed."
sleep 2
else
echo "$cmssw_version not found. Installing..."
sleep 2
cmsrel $cmssw_version
echo "creating path for pythia config fragment in $cmssw_version directory"
sleep 2
mkdir -vp $cmssw_version/src/Configuration/GenProduction/python/
fi
if [[ $run == "" ]]; then
echo "no run specified. Exiting."
exit 1
else
if [[ ! -z $(ls | grep "$run") ]]; then
echo "$run directory already exists. Exiting."
exit 1
else
echo "$run directory does not exist. Building directory structure."
mkdir -vp $run/input-cards/ $run/output-configs/ $run/root-files/ $run/text-logs/ $run/input-configs
fi
fi