Skip to content

Commit 06ad1a5

Browse files
committed
Improve homebrew enable/disable
1 parent cb091bb commit 06ad1a5

File tree

5 files changed

+35
-55
lines changed

5 files changed

+35
-55
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/usr/bin/env bash
2+
3+
set -e
4+
5+
run0 rm -rf /home/linuxbrew
6+
sed -i '/heliumos-homebrew/d' $HOME/.bashrc
7+
8+
echo "****************************************"
9+
echo "--Complete--"
10+
echo "Homebrew has been removed from the system!"
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/usr/bin/env bash
2+
3+
set -e
4+
5+
curl -L -o /tmp/homebrew-install.sh https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh
6+
bash /tmp/homebrew-install.sh
7+
rm /tmp/homebrew-install.sh
8+
sed -i 's,# .bashrc,# .bashrc\nsource /usr/share/heliumos/feature/homebrew/env.sh # heliumos-homebrew DO NOT MODIFY\n,g' $HOME/.bashrc
9+
10+
echo "****************************************"
11+
echo "--Complete--"
12+
echo "Run 'source ~/.bashrc' or restart your terminal to start using Homebrew with 'brew'!"

10/system_root/usr/bin/heliumos-homebrew-install

Lines changed: 0 additions & 40 deletions
This file was deleted.

10/system_root/usr/bin/heliumos-homebrew-remove

Lines changed: 0 additions & 15 deletions
This file was deleted.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
export IN_DISTROBOX=1
2+
distrobox-host-exec ls 2> /dev/null > /dev/null || export IN_DISTROBOX=0
3+
4+
if [ "$IN_DISTROBOX" = "0" ]; then
5+
6+
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
7+
export PATH=$PATH:$(brew --prefix)/bin/
8+
export C_INCLUDE_PATH=$C_INCLUDE_PATH:$(brew --prefix)/include/
9+
export CPLUS_INCLUDE_PATH=$CPLUS_INCLUDE_PATH:$(brew --prefix)/include/
10+
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$(brew --prefix)/lib/
11+
export PKG_CONFIG_PATH=${PKG_CONFIG_PATH}:$(brew --prefix)/lib/pkgconfig/
12+
13+
fi

0 commit comments

Comments
 (0)