Skip to content

Commit

Permalink
chore: split brew from default.just (#278)
Browse files Browse the repository at this point in the history
* chore: split brew from default.just

* fix: justfile line ending
  • Loading branch information
m2Giles authored May 16, 2024
1 parent 50efe42 commit fe4d408
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 31 deletions.
31 changes: 0 additions & 31 deletions build/ublue-os-just/00-default.just
Original file line number Diff line number Diff line change
Expand Up @@ -68,37 +68,6 @@ setup-distrobox-git:
exit 0
fi

alias brew := install-brew

# Install Homebrew | https://brew.sh
install-brew:
#!/usr/bin/env bash
source /usr/lib/ujust/ujust.sh
if [[ ! -f "/var/home/linuxbrew/.linuxbrew/bin" || ! -x "/var/home/linuxbrew/.linuxbrew/bin/brew" ]]; then
echo "${b}Brew Installation${n}"
echo "Please ${b}IGNORE${n} everything the installer tells you to do at the end"
echo "We have already done it for you! You just need to close and re-open the terminal after installation"
echo "Do you understand?"
echo "Please type in \"YES I UNDERSTAND\" and press enter"
read ACCEPT
if [ "$ACCEPT" == "YES I UNDERSTAND" ]; then
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
else
echo "Capitalization matters when you type \"YES I UNDERSTAND\""
fi
fi
# if /etc/profile.d/brew.sh already exists, replace it with /usr/etc/profile.d/brew.sh
if [ -f /etc/profile.d/brew.sh ]; then
if [ -f /usr/etc/profile.d/brew.sh ]; then
sudo cp /usr/etc/profile.d/brew.sh /etc/profile.d/brew.sh
fi
fi
# Removes homebrew from system
remove-brew:
echo "Removing homebrew ..."
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)"

# Toggle display of the user-motd in terminal
toggle-user-motd:
#!/usr/bin/bash
Expand Down
30 changes: 30 additions & 0 deletions build/ublue-os-just/05-brew.just
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
alias brew := install-brew

# Install Homebrew | https://brew.sh
install-brew:
#!/usr/bin/env bash
source /usr/lib/ujust/ujust.sh
if [[ ! -f "/var/home/linuxbrew/.linuxbrew/bin" || ! -x "/var/home/linuxbrew/.linuxbrew/bin/brew" ]]; then
echo "${b}Brew Installation${n}"
echo "Please ${b}IGNORE${n} everything the installer tells you to do at the end"
echo "We have already done it for you! You just need to close and re-open the terminal after installation"
echo "Do you understand?"
echo "Please type in \"YES I UNDERSTAND\" and press enter"
read ACCEPT
if [ "$ACCEPT" == "YES I UNDERSTAND" ]; then
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
else
echo "Capitalization matters when you type \"YES I UNDERSTAND\""
fi
fi
# if /etc/profile.d/brew.sh already exists, replace it with /usr/etc/profile.d/brew.sh
if [ -f /etc/profile.d/brew.sh ]; then
if [ -f /usr/etc/profile.d/brew.sh ]; then
sudo cp /usr/etc/profile.d/brew.sh /etc/profile.d/brew.sh
fi
fi
# Removes homebrew from system
remove-brew:
echo "Removing homebrew ..."
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)"
4 changes: 4 additions & 0 deletions build/ublue-os-just/ublue-os-just.spec
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ Source21: toolbox.ini
Source22: 31-toolbox.just
Source23: brew.sh
Source24: 15-ublue-config.md
Source25: 05-brew.just

%global sub_name %{lua:t=string.gsub(rpm.expand("%{NAME}"), "^ublue%-os%-", ""); print(t)}

Expand Down Expand Up @@ -108,6 +109,9 @@ just --completions bash | sed -E 's/([\(_" ])just/\1ujust/g' > %{_datadir}/bash-
chmod 644 %{_datadir}/bash-completion/completions/ujust

%changelog
* Wed May 15 2024 m2Giles <[email protected]> - 0.33
- Split brew just file out

* Wed May 01 2024 Kyle Gospodnetich <[email protected]> - 0.32
- Add powerstat

Expand Down

0 comments on commit fe4d408

Please sign in to comment.