Skip to content

Commit 136bfd1

Browse files
authored
Update install-EasyBuild-develop.sh to allow installation without forking
Some users might just want to use the develop branch without creating all the forks in their account. Document that you can use "easybuilders" as the github name and do not add a 2nd remote in that case.
1 parent 2689e8a commit 136bfd1

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

easybuild/scripts/install-EasyBuild-develop.sh

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ print_usage()
1313
echo "Usage: $0 <github_username> <install_dir>"
1414
echo
1515
echo " github_username: username on GitHub for which the EasyBuild repositories should be cloned"
16+
echo " Use 'easybuilders' if you don't want to use a fork"
1617
echo
1718
echo " install_dir: directory where all the EasyBuild files will be installed"
1819
echo
@@ -28,11 +29,13 @@ github_clone_branch()
2829
echo "=== Cloning ${GITHUB_USERNAME}/${REPO} ..."
2930
git clone --branch "${BRANCH}" "[email protected]:${GITHUB_USERNAME}/${REPO}.git"
3031

31-
echo "=== Adding and fetching EasyBuilders GitHub repository @ easybuilders/${REPO} ..."
32-
cd "${REPO}"
33-
git remote add "github_easybuilders" "[email protected]:easybuilders/${REPO}.git"
34-
git fetch github_easybuilders
35-
git branch --set-upstream-to "github_easybuilders/${BRANCH}" "${BRANCH}"
32+
if [[ $GITHUB_USERNAME != "easybuilders" ]]; then
33+
echo "=== Adding and fetching EasyBuilders GitHub repository @ easybuilders/${REPO} ..."
34+
cd "${REPO}"
35+
git remote add "github_easybuilders" "[email protected]:easybuilders/${REPO}.git"
36+
git fetch github_easybuilders
37+
git branch --set-upstream-to "github_easybuilders/${BRANCH}" "${BRANCH}"
38+
fi
3639
}
3740

3841
# Print the content of the module

0 commit comments

Comments
 (0)