Merge pull request #187 from rmacklin/generalize-boot.sh

Generalize `boot.sh` to support running any ref
This commit is contained in:
David Heinemeier Hansson
2024-07-27 09:26:35 -07:00
committed by GitHub
2 changed files with 7 additions and 25 deletions

View File

@@ -1,23 +0,0 @@
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
echo "Installation starting..."
source ~/.local/share/omakub/install.sh

9
boot.sh Normal file → Executable file
View File

@@ -15,9 +15,14 @@ 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 stable Omakub..."
echo "Cloning Omakub..."
rm -rf ~/.local/share/omakub
git clone -b stable https://github.com/basecamp/omakub.git ~/.local/share/omakub >/dev/null
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 FETCH_HEAD
cd -
fi
echo "Installation starting..."
source ~/.local/share/omakub/install.sh