Skip to content

Commit

Permalink
feat: Use ujust to install brew (#956)
Browse files Browse the repository at this point in the history
Co-authored-by: Brian Ketelsen <[email protected]>
  • Loading branch information
KyleGospo and bketelsen authored Feb 27, 2024
1 parent 9026914 commit 312a7a7
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 43 deletions.
5 changes: 2 additions & 3 deletions Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,8 @@ RUN wget https://copr.fedorainfracloud.org/coprs/ublue-os/staging/repo/fedora-"$
systemctl enable dconf-update.service && \
systemctl enable ublue-update.timer && \
systemctl enable ublue-system-setup.service && \
systemctl enable ublue-system-networked-tasks.service && \
systemctl enable brew-install-workaround.service && \
systemctl --global enable ublue-user-networked-tasks.service && \
systemctl enable ublue-system-flatpak-manager.service && \
systemctl --global enable ublue-user-flatpak-manager.service && \
systemctl --global enable ublue-user-setup.service && \
fc-cache -f /usr/share/fonts/ubuntu && \
fc-cache -f /usr/share/fonts/inter && \
Expand Down
20 changes: 0 additions & 20 deletions usr/lib/systemd/system/brew-install-workaround.service

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[Unit]
Description=Manage tasks that require network access (Flatpaks)
Description=Manage system flatpaks
Documentation=https://github.com/ublue-os/endlish-oesque/issues/10
Wants=network-online.target
After=network-online.target ublue-system-setup.service

[Service]
Type=oneshot
ExecStart=/usr/libexec/ublue-system-networked-tasks
ExecStart=/usr/libexec/ublue-system-flatpak-manager
Restart=on-failure
RestartSec=30
StartLimitInterval=0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[Unit]
Description=Manage user activities that require network access (Flatpaks, Brew)
Description=Manage user flatpaks
Documentation=https://github.com/ublue-os/endlish-oesque/issues/10
Wants=network-online.target
After=network-online.target

[Service]
Type=oneshot
ExecStart=/usr/libexec/ublue-user-networked-tasks
ExecStart=/usr/libexec/ublue-user-flatpak-manager
Restart=on-failure
RestartSec=30
StartLimitInterval=0
Expand Down
1 change: 0 additions & 1 deletion usr/lib/tmpfiles.d/brew-install-workaround.conf

This file was deleted.

2 changes: 1 addition & 1 deletion usr/libexec/configure-terminal.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/usr/bin/bash
# shellcheck source=/dev/null
source /usr/lib/ujust/ujust.sh

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#!/usr/bin/env bash
#!/usr/bin/bash

# Script Version
VER=3
VER_FILE="/etc/ublue/networked_tasks_version"
VER_FILE="/etc/ublue/flatpak_manager_version"
VER_RAN=$(cat $VER_FILE)

# Run script if updated
if [[ -f $VER_FILE && $VER = $VER_RAN ]]; then
echo "Networked tasks v$VER has already ran. Exiting..."
echo "Flatpak manager v$VER has already ran. Exiting..."
exit 0
fi

Expand Down
2 changes: 1 addition & 1 deletion usr/libexec/ublue-system-setup
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/usr/bin/bash

IMAGE_INFO="/usr/share/ublue-os/image-info.json"
IMAGE_NAME=$(jq -r '."image-name"' < $IMAGE_INFO)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/usr/bin/env bash
#!/usr/bin/bash

# Script Version
VER=5
VER_FILE="${XDG_DATA_HOME:-$HOME/.local/share}/ublue/networked_tasks_version"
VER_FILE="${XDG_DATA_HOME:-$HOME/.local/share}/ublue/flatpak_manager_version"
VER_RAN=$(cat $VER_FILE)

mkdir -p "$(dirname "$VER_FILE")" || exit 1
Expand Down Expand Up @@ -50,11 +50,4 @@ fi

notify-send "Flatpak installer" "Finished installing user flatpaks" --app-name="Flatpak installer" -u NORMAL

# Install brew
if [[ ! -f "/var/home/linuxbrew/.linuxbrew/bin" || ! -x "/var/home/linuxbrew/.linuxbrew/bin/brew" ]]; then
/usr/bin/bash -c 'env NONINTERACTIVE=1 /usr/libexec/brew-install'
fi

notify-send "Brew installer" "Finished installing brew package manager" --app-name="Brew installer" -u NORMAL

echo $VER > $VER_FILE
2 changes: 1 addition & 1 deletion usr/libexec/ublue-user-setup
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/usr/bin/bash

# SCRIPT VERSION
USER_SETUP_VER=5
Expand Down

0 comments on commit 312a7a7

Please sign in to comment.