Skip to content

Commit a2fdfea

Browse files
authored
Merge pull request #4899 from Flamefire/patch-1
Update install-EasyBuild-develop.sh to allow installation without forking
2 parents e343bf2 + 2386ddd commit a2fdfea

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)