mirror of
https://gitea.blesmrt.net/mikaela/scripts.git
synced 2025-08-02 03:57:38 +02:00
Compare commits
3 Commits
30f21585d0
...
fcb486fc62
Author | SHA1 | Date | |
---|---|---|---|
fcb486fc62 | |||
755a3ac60f | |||
fe3832acc3 |
@ -73,9 +73,18 @@ fi
|
|||||||
# https://github.com/Homebrew/brew
|
# https://github.com/Homebrew/brew
|
||||||
if [[ -d /home/linuxbrew/.linuxbrew/bin && $(id -u) != 0 ]]; then
|
if [[ -d /home/linuxbrew/.linuxbrew/bin && $(id -u) != 0 ]]; then
|
||||||
eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv)
|
eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv)
|
||||||
/home/linuxbrew/.linuxbrew/bin/brew doctor
|
export HOMEBREW_CELLAR=/home/linuxbrew/.linuxbrew/Cellar
|
||||||
/home/linuxbrew/.linuxbrew/bin/brew update --quiet
|
export HOMEBREW_PREFIX=/home/linuxbrew/.linuxbrew
|
||||||
/home/linuxbrew/.linuxbrew/bin/brew upgrade --quiet
|
export HOMEBREW_REPOSITORY=/home/linuxbrew/.linuxbrew
|
||||||
|
if [[ -f /home/linuxbrew/.linuxbrew/bin/brew2 ]]; then
|
||||||
|
/home/linuxbrew/.linuxbrew/bin/brew2 doctor
|
||||||
|
/home/linuxbrew/.linuxbrew/bin/brew2 update --quiet
|
||||||
|
/home/linuxbrew/.linuxbrew/bin/brew2 upgrade --quiet
|
||||||
|
else
|
||||||
|
/home/linuxbrew/.linuxbrew/bin/brew doctor
|
||||||
|
/home/linuxbrew/.linuxbrew/bin/brew update --quiet
|
||||||
|
/home/linuxbrew/.linuxbrew/bin/brew upgrade --quiet
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
printf "Either linuxbrew is not installed or running as root, skipping linuxbrew...\n"
|
printf "Either linuxbrew is not installed or running as root, skipping linuxbrew...\n"
|
||||||
fi
|
fi
|
||||||
|
1
bash/usr-local-bin/brew
Symbolic link
1
bash/usr-local-bin/brew
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
homebrew
|
29
bash/usr-local-bin/homebrew
Executable file
29
bash/usr-local-bin/homebrew
Executable file
@ -0,0 +1,29 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Homebrew workaround particularly for Fedora Atomic.
|
||||||
|
# Based on the syncplay script in this folder and the patching idea is from
|
||||||
|
# https://github.com/orgs/Homebrew/discussions/1282#discussioncomment-1281288
|
||||||
|
|
||||||
|
if [ -d /var/roothome ]; then
|
||||||
|
set -x
|
||||||
|
export LC_ALL=C.utf8
|
||||||
|
|
||||||
|
if [ -f "/tmp/brew.$(id -u).$(date -I)" ]; then
|
||||||
|
echo "Homebrew has been patched today. If this is wrong, rm /tmp/brew.$(id -u).$(date -I)"
|
||||||
|
else
|
||||||
|
if [ ! -d "/home/linuxbrew/.linuxbrew" ]; then
|
||||||
|
echo "Homebrew not found."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd /home/linuxbrew/.linuxbrew/bin/
|
||||||
|
cp brew brew2
|
||||||
|
sed -i 's/pwd\ \-P/pwd/g' brew2
|
||||||
|
touch "/tmp/brew.$(id -u).$(date -I)"
|
||||||
|
fi
|
||||||
|
|
||||||
|
env brew2 $@
|
||||||
|
set +x
|
||||||
|
else
|
||||||
|
env brew $@
|
||||||
|
fi
|
Loading…
x
Reference in New Issue
Block a user