-
Notifications
You must be signed in to change notification settings - Fork 0
/
brook.sh
29 lines (25 loc) · 986 Bytes
/
brook.sh
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
#!/bin/bash
if [ "$(uname -s)" != "Linux" ];then
echo "This script only support Linux";
exit;
fi
restartsh=""
if [ ! -f "$HOME/.nami/bin/nami" ] || [ ! -f "$HOME/.nami/bin/joker" ] || [ ! -f "$HOME/.nami/bin/brook" ] || [ ! -f "$HOME/.nami/bin/7z" ] || [ ! -f "$HOME/.nami/bin/bun" ] || [ ! -f "$HOME/.nami/bin/bunu" ] || [ `echo $PATH | grep $HOME/.nami/bin | wc -l` -eq 0 ];then
mkdir -p $HOME/.nami/bin
curl -L -o $HOME/.nami/bin/nami "https://github.com/txthinking/nami/releases/latest/download/nami_linux_amd64"
chmod +x $HOME/.nami/bin/nami
echo 'export PATH=$HOME/.nami/bin:$PATH' >> $HOME/.bashrc
echo 'export PATH=$HOME/.nami/bin:$PATH' >> $HOME/.bash_profile
echo 'export PATH=$HOME/.nami/bin:$PATH' >> $HOME/.zshenv
export PATH=$HOME/.nami/bin:$PATH
nami install joker
nami install brook
nami install 7z
nami install bun
nami install bun.plus
restartsh="todo"
fi
bunu https://bash.ooo/brook.js
if [ "$restartsh" = "todo" ];then
exec -l $SHELL
fi