Files
omakub/boot.sh
Richard Macklin 737dea57bf Update boot.sh to avoid detached HEAD state when not necessary
This is a follow-up to 1767107038 -
instead of checking out `FETCH_HEAD`, which always puts the user in
'detached HEAD' state, we will check out `${OMAKUB_REF:-stable}` so that
we only end up in 'detached HEAD' state when necessary (i.e. when
checking out a SHA rather than a branch).
2024-08-02 14:04:39 -07:00

29 lines
863 B
Bash
Executable File

set -e
ascii_art='________ __ ___.
\_____ \ _____ _____ | | ____ _\_ |__
/ | \ / \\__ \ | |/ / | \ __ \
/ | \ Y Y \/ __ \| <| | / \_\ \
\_______ /__|_| (____ /__|_ \____/|___ /
\/ \/ \/ \/ \/
'
echo -e "$ascii_art"
echo "=> Omakub is for fresh Ubuntu 24.04 installations only!"
echo -e "\nBegin installation (or abort with ctrl+c)..."
sudo apt-get update >/dev/null
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
if [[ $OMAKUB_REF != "master" ]]; then
cd ~/.local/share/omakub
git fetch origin "${OMAKUB_REF:-stable}" && git checkout "${OMAKUB_REF:-stable}"
cd -
fi
echo "Installation starting..."
source ~/.local/share/omakub/install.sh