-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from rlcee/210401
210401
- Loading branch information
Showing
6 changed files
with
145 additions
and
30 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -98,24 +98,31 @@ mg_test_clean() { | |
mg_init() { | ||
local USERNAME="$1" | ||
|
||
if [ ! -d Offline ]; then | ||
git init Offline || exit 1 | ||
CWD=$(basename $PWD) | ||
if [[ "$CWD" == "Offline" || -d Offline ]]; then | ||
echo "mgit - mgit can't turn an existing repo into a partial checkout" | ||
exit 1 | ||
fi | ||
|
||
|
||
git init -b master Offline || exit 1 | ||
cd Offline | ||
|
||
echo "mgit - adding and fetching remote mu2e from: github/Mu2e" | ||
TEST=$( git remote -v | grep fetch | awk '{if($1=="mu2e") print $1}' ) | ||
if [ -z "$TEST" ]; then | ||
git remote add mu2e https://github.com/Mu2e/Offline || exit 1 | ||
fi | ||
|
||
git fetch mu2e || exit 1 | ||
git fetch -q mu2e || exit 1 | ||
|
||
if [ -n "$USERNAME" ]; then | ||
echo "mgit - adding and fetching remote origin from: github/$USERNAME" | ||
TEST=$( git remote -v | grep fetch | awk '{if($1=="origin") print $1}' ) | ||
if [ -z "$TEST" ]; then | ||
git remote add origin [email protected]:${USERNAME}/Offline || exit 1 | ||
fi | ||
git fetch origin || exit 1 | ||
git fetch -q origin || exit 1 | ||
fi | ||
|
||
# save variables to .git/config | ||
|
@@ -127,8 +134,9 @@ mg_init() { | |
echo "/.gitignore" >> .git/info/sparse-checkout | ||
# echo "/site_scons" >> .git/info/sparse-checkout | ||
|
||
git checkout -b mgit_work mu2e/master || exit 1 | ||
git read-tree --reset -u HEAD || exit 1 | ||
#git checkout -b mgit_work mu2e/master || exit 1 | ||
#git read-tree --reset -u HEAD || exit 1 | ||
git read-tree --empty || exit 1 | ||
|
||
return 0 | ||
|
||
|
@@ -225,7 +233,7 @@ mg_add() { | |
fi | ||
done | ||
|
||
git checkout $BRANCH | ||
git checkout -q $BRANCH | ||
|
||
} | ||
|
||
|
@@ -264,9 +272,9 @@ mg_rm() { | |
done | ||
|
||
# this acts on the change | ||
git checkout $BRANCH | ||
git checkout -q $BRANCH | ||
|
||
echo "mgit - *** use \"muse build -c\" to remove build products from removed local source code ***" | ||
echo "mgit - *** use \"muse build -c\" to remove build products from local build area ***" | ||
|
||
} | ||
|
||
|
@@ -315,19 +323,19 @@ shift | |
if [ -z "$command" ]; then | ||
echo -e "\nERROR - no command\n" | ||
mg_help | ||
return 1 | ||
exit 1 | ||
elif [ "$command" == "init" ]; then | ||
if [[ -n "$MUSE_WORKING_DIR" && "$PWD" != "$MUSE_WORKING_DIR" ]]; then | ||
# if muse setup was run, the only reasonable place to run init is the working dir | ||
echo -e "\nERROR - muse setup has been run, please cd to MUSE_WORKING_DIR to init\n" | ||
return 1 | ||
exit 1 | ||
fi | ||
elif [ "$command" != "help" ]; then | ||
THISDIR=$( basename $PWD) | ||
if [[ "$THISDIR" != "Offline" || ! -d .git ]]; then | ||
# all other commands are run in Offline directory | ||
echo -e "\nERROR - mgit must be run in an Offline repo area\n" | ||
return 1 | ||
exit 1 | ||
fi | ||
fi | ||
|
||
|
@@ -356,4 +364,5 @@ case "$command" in | |
;; | ||
esac | ||
|
||
exit 0 | ||
|
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 |
---|---|---|
@@ -0,0 +1,83 @@ | ||
|
||
# the lines starting with two hashes are documentation which can be printed | ||
## Adding KinKal 4/1/2021 | ||
|
||
# | ||
# use preferred build type, if none requested | ||
# | ||
if [ -z "$MUSE_BUILD" ]; then | ||
export MUSE_BUILD=prof | ||
if [ $MUSE_VERBOSE -gt 0 ]; then | ||
echo "INFO - MUSE_BUILD defaulting to $MUSE_BUILD in $MUSE_ENVSET" | ||
fi | ||
fi | ||
|
||
# | ||
# use preferred compiler, if none requested | ||
# | ||
if [ -z "$MUSE_COMPILER_E" ]; then | ||
export MUSE_COMPILER_E=e20 | ||
if [ $MUSE_VERBOSE -gt 0 ]; then | ||
echo "INFO - MUSE_COMPILER_E defaulting to $MUSE_COMPILER_E in $MUSE_ENVSET" | ||
fi | ||
fi | ||
|
||
# | ||
# use preferred python flag, if none requested | ||
# | ||
if [ -z "$MUSE_PYTHON" ]; then | ||
export MUSE_PYTHON=p383b | ||
if [ $MUSE_VERBOSE -gt 0 ]; then | ||
echo "INFO - MUSE_PYTHON defaulting to $MUSE_PYTHON in $MUSE_ENVSET" | ||
fi | ||
fi | ||
|
||
# art | ||
# these two lines must be coordinated | ||
setup -B art_root_io v1_05_01 -q${MUSE_BUILD}:+${MUSE_COMPILER_E} | ||
export MUSE_ART=s105 | ||
|
||
|
||
# | ||
# geant4 | ||
# | ||
GFLAGS=+${MUSE_BUILD}:+${MUSE_COMPILER_E} | ||
if [ -z "$MUSE_G4ST" ]; then | ||
GFLAGS=${GFLAGS}:+mt | ||
fi | ||
if [ -n "$MUSE_G4VG" ]; then | ||
GFLAGS=${GFLAGS}:+vg | ||
fi | ||
if [ "$MUSE_G4VIS" == "qt" ]; then | ||
GFLAGS=${GFLAGS}:+qt | ||
fi | ||
|
||
setup -B geant4 v4_10_6_p02b -q${GFLAGS} | ||
|
||
# | ||
# everything else | ||
# | ||
|
||
setup -B xerces_c v3_2_3 -q +${MUSE_BUILD}:+${MUSE_COMPILER_E} | ||
setup -B mu2e_artdaq_core v1_05_04 -q +${MUSE_BUILD}:+${MUSE_COMPILER_E}:+${MUSE_ART}:offline | ||
setup -B heppdt v03_04_02 -q +${MUSE_BUILD}:+${MUSE_COMPILER_E} | ||
setup -B BTrk v1_02_30 -q +${MUSE_BUILD}:+${MUSE_COMPILER_E}:+${MUSE_PYTHON} | ||
setup -B KinKal v00_01_04 -q +${MUSE_BUILD}:+${MUSE_COMPILER_E}:+${MUSE_PYTHON} | ||
setup -B cry v1_7n -q +${MUSE_BUILD}:+${MUSE_COMPILER_E} | ||
setup -B gsl v2_6a | ||
setup curl v7_64_1 | ||
setup cryptopp v08_02_00 -q +${MUSE_BUILD}:+${MUSE_COMPILER_E} | ||
setup -B scons v3_1_2 -q +${MUSE_PYTHON} | ||
setup -B gdb v9_2 | ||
|
||
|
||
setup -B gallery v1_16_01 -q+${MUSE_BUILD}:+${MUSE_COMPILER_E} | ||
#setup -B ifdhc v2_5_8 -q e20:p383b:prof | ||
setup -B cetbuildtools v7_17_01 | ||
setup -B valgrind v3_16_1 | ||
setup -B cmake v3_17_3 | ||
|
||
# Local Variables: | ||
# mode: sh | ||
# End: | ||
# vi:syntax=sh |
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