Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Headless installation patch #277

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
3 changes: 3 additions & 0 deletions defaults/bash/shell
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ HISTSIZE=32768
HISTFILESIZE="${HISTSIZE}"

# Autocompletion
if [ ! -f /usr/share/bash-completion/bash_completion ]; then
sudo apt install -y bash-completion
fi
source /usr/share/bash-completion/bash_completion

# Set complete path
Expand Down
2 changes: 1 addition & 1 deletion install/check-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ fi
. /etc/os-release

# Check if running on Ubuntu 24.04 or higher
if [ "$ID" != "ubuntu" ] || [ $(echo "$VERSION_ID >= 24.04" | bc) != 1 ]; then
if [ "$ID" != "ubuntu" ] || [ $(python3 -c "print(int(float('$VERSION_ID') >= 24.04))") != 1 ]; then
echo "$(tput setaf 1)Error: OS requirement not met"
echo "You are currently running: $ID $VERSION_ID"
echo "OS required: ubuntu 24.04 or higher"
Expand Down
3 changes: 3 additions & 0 deletions install/terminal.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,8 @@ sudo apt update -y
sudo apt upgrade -y
sudo apt install -y curl git unzip

# Ensure required installers first
for installer in ~/.local/share/omakub/install/terminal/required/*.sh; do source $installer; done

# Run terminal installers
for installer in ~/.local/share/omakub/install/terminal/*.sh; do source $installer; done
6 changes: 6 additions & 0 deletions install/terminal/app-fzf.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Install fzf with key-bindings ensured
sudo apt install -y fzf

if [[ ! -f /usr/share/doc/fzf/examples/key-bindings.bash ]]; then
sudo curl https://raw.githubusercontent.com/junegunn/fzf/master/shell/key-bindings.bash -o /usr/share/doc/fzf/examples/key-bindings.bash
fi
2 changes: 1 addition & 1 deletion install/terminal/apps-terminal.sh
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sudo apt install -y fzf ripgrep bat eza zoxide plocate btop apache2-utils fd-find tldr
sudo apt install -y ripgrep bat eza zoxide plocate btop apache2-utils fd-find tldr
2 changes: 1 addition & 1 deletion install/terminal/required/app-gum.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Gum is used for the Omakub commands for tailoring Omakub after the initial install
# Gum is used for the Omakub commands for tailoring Omakub
cd /tmp
GUM_VERSION="0.14.3" # Use known good version
wget -qO gum.deb "https://github.com/charmbracelet/gum/releases/download/v${GUM_VERSION}/gum_${GUM_VERSION}_amd64.deb"
Expand Down
7 changes: 7 additions & 0 deletions install/terminal/required/apt-add-reporsitory.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Add add-apt-repository when not available

# Check if add-apt-repository is available
if ! command -v add-apt-repository &> /dev/null; then
# Install software-properties-common
sudo apt-get install -y software-properties-common
fi