Skip to content

Commit

Permalink
Create reload-init
Browse files Browse the repository at this point in the history
  • Loading branch information
dnkmmr69420 authored Apr 15, 2024
1 parent 0469446 commit 52a926c
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions bin/reload-init
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash

mkdir -p $HOME/.local/share/clinuxbrew/exports/bin

if test ! -f /home/linuxbrew/.linuxbrew/bin/brew; then
echo "Installing brew..."
NONINTERACTIVE=1 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
sudo chown $USER:$USER /home/linuxbrew
fi

if test ! -f "$HOME/.config/systemd/user/brew-container.service"; then
mkdir -p "$HOME/.config/systemd/user"
cp /usr/local/lib/cbrew/brew-container.service "$HOME/.config/systemd/user/brew-container.service"
distrobox-host-exec -Y systemctl enable --user --now brew-container.service
fi

[ -f /run/host/usr/bin/docker ] && sudo ln -fs /usr/bin/distrobox-host-exec /usr/local/bin/docker || sudo rm -f /usr/local/bin/docker
[ -f /run/host/usr/bin/flatpak ] && sudo ln -fs /usr/bin/distrobox-host-exec /usr/local/bin/flatpak || sudo rm -f /usr/local/bin/flatpak
[ -f /run/host/usr/bin/podman ] && sudo ln -fs /usr/bin/distrobox-host-exec /usr/local/bin/podman || sudo rm -f /usr/local/bin/podman
[ -f /run/host/usr/bin/rpm-ostree ] && sudo ln -fs /usr/bin/distrobox-host-exec /usr/local/bin/rpm-ostree || sudo rm -f /usr/local/bin/rpm-ostree
[ -f /run/host/usr/bin/transactional-update ] && sudo ln -fs /usr/bin/distrobox-host-exec /usr/local/bin/transactional-update || sudo rm -f /usr/local/bin/transactional-update
[ -f /run/host/usr/bin/ujust ] && sudo ln -fs /usr/bin/distrobox-host-exec /usr/local/bin/ujust || sudo rm -f /usr/local/bin/ujust

0 comments on commit 52a926c

Please sign in to comment.