-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* update get-diff shell script * add badge * remove unneeded imports * shell script formatting * code cleanup * Update zenodo release
- Loading branch information
1 parent
15c4d2b
commit 73f43ea
Showing
12 changed files
with
44 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,47 +9,47 @@ if [ -z "$tarball" ]; then | |
fi | ||
# create the checkout location if it does not exist | ||
if [ ! -d "$checkout_location" ]; then | ||
mkdir -p $checkout_location | ||
mkdir -p "$checkout_location" | ||
fi | ||
|
||
if [ -d "$tarball" ]; then | ||
echo "Using tarball folder $tarball" | ||
mkdir temp | ||
cp -r $tarball temp/ | ||
tarball=$(realpath temp/$tarball) | ||
cp -r "$tarball" temp/ | ||
tarball=$(realpath "temp/$tarball") | ||
# if tarball is a file, unpack it here | ||
elif [ -f "$tarball" ]; then | ||
echo "Using tarball file $tarball" | ||
mkdir temp | ||
tar -xzf $tarball -C temp/ | ||
tar -xzf "$tarball" -C temp/ | ||
tarball=$(realpath temp) | ||
else | ||
echo "ERROR: tarball must be a file or a folder" | ||
exit 1 | ||
fi | ||
# go to the checkout location | ||
cd $checkout_location | ||
cd "$checkout_location" | ||
echo "Using temporary tarball copy in $tarball" | ||
# read the commit hashes from the diff folder in the tarball | ||
base_commit=$(cat $tarball/diff/base_commit_hash.txt) | ||
analysis_commit=$(cat $tarball/diff/analysis_commit_hash.txt) | ||
analysis_name=$(cat $tarball/diff/analysis_name.txt) | ||
base_commit=$(cat "$tarball/diff/base_commit_hash.txt") | ||
analysis_commit=$(cat "$tarball/diff/analysis_commit_hash.txt") | ||
analysis_name=$(cat "$tarball/diff/analysis_name.txt") | ||
|
||
# checkout the base repository with the commit hash | ||
git clone --recursive [email protected]:KIT-CMS/CROWN | ||
cd CROWN | ||
git checkout $base_commit | ||
git checkout "$base_commit" | ||
# apply the base diff | ||
git apply $tarball/diff/base_diff.patch | ||
git apply "$tarball/diff/base_diff.patch" | ||
# setup the analysis with the init script | ||
bash init.sh $analysis_name | ||
bash init.sh "$analysis_name" | ||
# checkout the analysis repository with the commit hash | ||
cd analysis_configurations/$analysis_name | ||
git checkout $analysis_commit | ||
cd "analysis_configurations/$analysis_name" | ||
git checkout "$analysis_commit" | ||
# apply the analysis diff | ||
git apply $tarball/diff/analysis_diff.patch | ||
git apply "$tarball/diff/analysis_diff.patch" | ||
# cleanup the temporary tarball | ||
rm -rf $tarball | ||
rm -rf "$tarball" | ||
echo "**************************************************************" | ||
echo "* Setup from tarball finished. You can now run the analysis *" | ||
echo "**************************************************************" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -58,16 +58,15 @@ if [ -z "$1" ]; then | |
else | ||
if [[ "$1" == "tau" && ! -d "${SCRIPT_DIR}/analysis_configurations/tau" ]]; then | ||
echo "Cloning analysis tau into ${SCRIPT_DIR}/analysis_configurations/tau" | ||
git clone [email protected]:KIT-CMS/TauAnalysis-CROWN.git ${SCRIPT_DIR}/analysis_configurations/tau | ||
git clone [email protected]:KIT-CMS/TauAnalysis-CROWN.git "${SCRIPT_DIR}/analysis_configurations/tau" | ||
elif [[ "$1" == "earlyrun3" && ! -d "${SCRIPT_DIR}/analysis_configurations/earlyrun3" ]]; then | ||
echo "Cloning analysis earlyrun3 into ${SCRIPT_DIR}/analysis_configurations/earlyrun3" | ||
git clone https://github.com/khaosmos93/CROWN-config-earlyRun3.git ${SCRIPT_DIR}/analysis_configurations/earlyrun3 | ||
git clone https://github.com/khaosmos93/CROWN-config-earlyRun3.git "${SCRIPT_DIR}/analysis_configurations/earlyrun3" | ||
elif [[ "$1" == "whtautau" && ! -d "${SCRIPT_DIR}/analysis_configurations/whtautau" ]]; then | ||
echo "Cloning analysis whtautau into ${SCRIPT_DIR}/analysis_configurations/whtautau" | ||
git clone [email protected]:KIT-CMS/WHTauTauAnalysis-CROWN.git ${SCRIPT_DIR}/analysis_configurations/whtautau | ||
elif [[ "$1" == "s" && ! -d "${SCRIPT_DIR}/analysis_configurations/s" ]] | ||
then | ||
git clone [email protected]:KIT-CMS/WHTauTauAnalysis-CROWN.git "${SCRIPT_DIR}/analysis_configurations/whtautau" | ||
elif [[ "$1" == "s" && ! -d "${SCRIPT_DIR}/analysis_configurations/s" ]]; then | ||
echo "Cloning analysis s-channel into ${SCRIPT_DIR}/analysis_configurations/s" | ||
git clone [email protected]:nfaltermann/CROWNs.git ${SCRIPT_DIR}/analysis_configurations/s | ||
git clone [email protected]:nfaltermann/CROWNs.git "${SCRIPT_DIR}/analysis_configurations/s" | ||
fi | ||
fi |