From ebc6863740190898a4e42991c454823e1593e225 Mon Sep 17 00:00:00 2001 From: Richard Macklin Date: Thu, 4 Jul 2024 00:09:26 -0700 Subject: [PATCH] Avoid unnecessary git commands if `OMAKUB_REF` is `master` Otherwise it'd try to check out the branch it's already on. --- boot.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/boot.sh b/boot.sh index 4dc374c..97f0884 100755 --- a/boot.sh +++ b/boot.sh @@ -18,9 +18,11 @@ sudo apt-get install -y git >/dev/null echo "Cloning Omakub..." rm -rf ~/.local/share/omakub git clone https://github.com/basecamp/omakub.git ~/.local/share/omakub >/dev/null -cd ~/.local/share/omakub -git fetch origin "${OMAKUB_REF:-stable}" && git checkout FETCH_HEAD -cd - +if [[ $OMAKUB_REF != "master" ]]; then + cd ~/.local/share/omakub + git fetch origin "${OMAKUB_REF:-stable}" && git checkout FETCH_HEAD + cd - +fi echo "Installation starting..." source ~/.local/share/omakub/install.sh