generated from ublue-os/boxkit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
opt-compatability
32 lines (26 loc) · 881 Bytes
/
opt-compatability
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/usr/bin/env bash
if (( $EUID != 0 )); then
echo "Must be ran as root"
exit 1
fi
mkdir -p /opt/brave.com
mkdir -p /opt/brave.com/brave
mkdir -p /opt/brave.com/brave-beta
mkdir -p /opt/brave.com/brave-nightly
tee /opt/brave.com/brave/brave-browser <<EOF
#!/usr/bin/env bash
brave-browser "\$@"
EOF
chmod +x /opt/brave.com/brave/brave-browser
tee /opt/brave.com/brave-beta/brave-browser-beta <<EOF
#!/usr/bin/env bash
brave-browser-beta "\$@"
EOF
chmod +x /opt/brave.com/brave-beta/brave-browser-beta
ln -sf /opt/brave.com/brave-beta/brave-browser-beta /opt/brave.com/brave-beta/brave-browser
tee /opt/brave.com/brave-nightly/brave-browser-nightly <<EOF
#!/usr/bin/env bash
brave-browser-nightly "\$@"
EOF
chmod +x /opt/brave.com/brave-nightly/brave-browser-nightly
ln -sf /opt/brave.com/brave-nightly/brave-browser-nightly /opt/brave.com/brave-nightly/brave-browser