mirror of
https://gitea.blesmrt.net/mikaela/scripts.git
synced 2025-10-15 10:07:25 +02:00
homebrew: bypass the patching and all if not on Fedora Atomic
This commit is contained in:
parent
fe3832acc3
commit
755a3ac60f
@ -4,22 +4,26 @@
|
|||||||
# Based on the syncplay script in this folder and the patching idea is from
|
# Based on the syncplay script in this folder and the patching idea is from
|
||||||
# https://github.com/orgs/Homebrew/discussions/1282#discussioncomment-1281288
|
# https://github.com/orgs/Homebrew/discussions/1282#discussioncomment-1281288
|
||||||
|
|
||||||
set -x
|
if [ -d /var/roothome ]; then
|
||||||
export LC_ALL=C.utf8
|
set -x
|
||||||
|
export LC_ALL=C.utf8
|
||||||
|
|
||||||
if [ -f "/tmp/brew.$(id -u).$(date -I)" ]; then
|
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)"
|
echo "Homebrew has been patched today. If this is wrong, rm /tmp/brew.$(id -u).$(date -I)"
|
||||||
else
|
else
|
||||||
if [ ! -d "/home/linuxbrew/.linuxbrew" ]; then
|
if [ ! -d "/home/linuxbrew/.linuxbrew" ]; then
|
||||||
echo "Homebrew not found."
|
echo "Homebrew not found."
|
||||||
exit 1
|
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
|
fi
|
||||||
|
|
||||||
cd /home/linuxbrew/.linuxbrew/bin/
|
env brew2 $@
|
||||||
cp brew brew2
|
set +x
|
||||||
sed -i 's/pwd\ \-P/pwd/g' brew2
|
else
|
||||||
touch "/tmp/brew.$(id -u).$(date -I)"
|
env brew $@
|
||||||
fi
|
fi
|
||||||
|
|
||||||
env brew2 $@
|
|
||||||
set +x
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user