Skip to content
This repository was archived by the owner on Feb 24, 2025. It is now read-only.

Commit fe4d408

Browse files
authored
chore: split brew from default.just (#278)
* chore: split brew from default.just * fix: justfile line ending
1 parent 50efe42 commit fe4d408

File tree

3 files changed

+34
-31
lines changed

3 files changed

+34
-31
lines changed

build/ublue-os-just/00-default.just

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -68,37 +68,6 @@ setup-distrobox-git:
6868
exit 0
6969
fi
7070

71-
alias brew := install-brew
72-
73-
# Install Homebrew | https://brew.sh
74-
install-brew:
75-
#!/usr/bin/env bash
76-
source /usr/lib/ujust/ujust.sh
77-
if [[ ! -f "/var/home/linuxbrew/.linuxbrew/bin" || ! -x "/var/home/linuxbrew/.linuxbrew/bin/brew" ]]; then
78-
echo "${b}Brew Installation${n}"
79-
echo "Please ${b}IGNORE${n} everything the installer tells you to do at the end"
80-
echo "We have already done it for you! You just need to close and re-open the terminal after installation"
81-
echo "Do you understand?"
82-
echo "Please type in \"YES I UNDERSTAND\" and press enter"
83-
read ACCEPT
84-
if [ "$ACCEPT" == "YES I UNDERSTAND" ]; then
85-
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
86-
else
87-
echo "Capitalization matters when you type \"YES I UNDERSTAND\""
88-
fi
89-
fi
90-
# if /etc/profile.d/brew.sh already exists, replace it with /usr/etc/profile.d/brew.sh
91-
if [ -f /etc/profile.d/brew.sh ]; then
92-
if [ -f /usr/etc/profile.d/brew.sh ]; then
93-
sudo cp /usr/etc/profile.d/brew.sh /etc/profile.d/brew.sh
94-
fi
95-
fi
96-
97-
# Removes homebrew from system
98-
remove-brew:
99-
echo "Removing homebrew ..."
100-
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)"
101-
10271
# Toggle display of the user-motd in terminal
10372
toggle-user-motd:
10473
#!/usr/bin/bash

build/ublue-os-just/05-brew.just

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
alias brew := install-brew
2+
3+
# Install Homebrew | https://brew.sh
4+
install-brew:
5+
#!/usr/bin/env bash
6+
source /usr/lib/ujust/ujust.sh
7+
if [[ ! -f "/var/home/linuxbrew/.linuxbrew/bin" || ! -x "/var/home/linuxbrew/.linuxbrew/bin/brew" ]]; then
8+
echo "${b}Brew Installation${n}"
9+
echo "Please ${b}IGNORE${n} everything the installer tells you to do at the end"
10+
echo "We have already done it for you! You just need to close and re-open the terminal after installation"
11+
echo "Do you understand?"
12+
echo "Please type in \"YES I UNDERSTAND\" and press enter"
13+
read ACCEPT
14+
if [ "$ACCEPT" == "YES I UNDERSTAND" ]; then
15+
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
16+
else
17+
echo "Capitalization matters when you type \"YES I UNDERSTAND\""
18+
fi
19+
fi
20+
# if /etc/profile.d/brew.sh already exists, replace it with /usr/etc/profile.d/brew.sh
21+
if [ -f /etc/profile.d/brew.sh ]; then
22+
if [ -f /usr/etc/profile.d/brew.sh ]; then
23+
sudo cp /usr/etc/profile.d/brew.sh /etc/profile.d/brew.sh
24+
fi
25+
fi
26+
27+
# Removes homebrew from system
28+
remove-brew:
29+
echo "Removing homebrew ..."
30+
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)"

build/ublue-os-just/ublue-os-just.spec

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ Source21: toolbox.ini
3737
Source22: 31-toolbox.just
3838
Source23: brew.sh
3939
Source24: 15-ublue-config.md
40+
Source25: 05-brew.just
4041

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

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

110111
%changelog
112+
* Wed May 15 2024 m2Giles <69128853+m2Giles@users.noreply.github.com> - 0.33
113+
- Split brew just file out
114+
111115
* Wed May 01 2024 Kyle Gospodnetich <me@kylegospodneti.ch> - 0.32
112116
- Add powerstat
113117

0 commit comments

Comments
 (0)