-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.toml
50 lines (41 loc) · 1.24 KB
/
Makefile.toml
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# run "cargo make install" to freshly install pacbrow.
# run "cargo make reinstall" to update pacbrow.
# run "cargo make uninstall" to uninstall pacbrow.
[tasks.build]
command = "cargo"
args = ["build", "--release"]
[tasks.clean]
command = "cargo"
args = ["clean"]
[tasks.createconfig]
script = '''
sudo mkdir -p ~/.config/pacbrow/
sudo cp ./configcomment.toml ./tempconfig.toml
sudo chmod 777 ./tempconfig.toml
sudo cat ./config.toml >> ./tempconfig.toml
sudo cp -n ./tempconfig.toml ~/.config/pacbrow/config.toml
sudo rm ./tempconfig.toml
sudo \cp -i ./defaultconfigcomment.toml ~/.config/pacbrow/default-config.toml
sudo chmod 777 ~/.config/pacbrow/default-config.toml
sudo cat ./config.toml >> ~/.config/pacbrow/default-config.toml
sudo chmod 555 ~/.config/pacbrow/default-config.toml
'''
[tasks.addtousr]
script = '''
sudo mkdir -p /usr/local/bin/
sudo cp ./target/release/pacbrow /usr/local/bin/pacbrow
'''
[tasks.removeconfig]
script = '''
sudo rm -rf ~/.config/pacbrow/
'''
[tasks.deleteprogram]
script = '''
sudo rm -f /usr/local/bin/pacbrow
'''
[tasks.install]
dependencies = ["clean", "build", "createconfig", "addtousr"]
[tasks.uninstall]
dependencies = ["removeconfig", "deleteprogram"]
[tasks.reinstall]
dependencies = ["uninstall", "install"]