Skip to content

Commit aa41354

Browse files
committed
Add dnf5 support
1 parent 496b1f8 commit aa41354

File tree

1 file changed

+36
-4
lines changed

1 file changed

+36
-4
lines changed

installer/rpm.sh

Lines changed: 36 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,31 @@
11
#!/bin/sh -xu
22

33

4-
# Option A: Install FileBot via DNF
4+
# Option A: Install FileBot via DNF5
5+
if dnf5 --version 2> /dev/null
6+
then
7+
# 0. Install dnf config-manager
8+
sudo dnf5 -y install 'dnf-command(config-manager)'
9+
10+
# 1. Add repository
11+
sudo dnf5 -y config-manager addrepo --from-repofile='https://raw.githubusercontent.com/filebot/plugins/master/yum/main.repo'
12+
13+
# 2. Enable repository
14+
sudo dnf5 -y config-manager setopt filebot.enabled=1
15+
16+
# 3. Install dependencies
17+
sudo dnf5 -y install zenity mediainfo
18+
19+
# 4. Install FileBot
20+
sudo dnf5 -y install filebot
21+
22+
# 5. Run FileBot
23+
filebot -script fn:sysinfo
24+
exit $?
25+
fi
26+
27+
28+
# Option B: Install FileBot via DNF
529
if dnf --version 2> /dev/null
630
then
731
# 0. Install dnf config-manager
@@ -18,10 +42,14 @@ then
1842

1943
# 4. Install FileBot
2044
sudo dnf -y install filebot
45+
46+
# 5. Run FileBot
47+
filebot -script fn:sysinfo
48+
exit $?
2149
fi
2250

2351

24-
# Option B: Install FileBot via ZYPPER
52+
# Option C: Install FileBot via ZYPPER
2553
if zypper --version 2> /dev/null
2654
then
2755
# 1. Add repository
@@ -32,8 +60,12 @@ then
3260

3361
# 3. Install FileBot
3462
sudo zypper --non-interactive install filebot
63+
64+
# 4. Run FileBot
65+
filebot -script fn:sysinfo
66+
exit $?
3567
fi
3668

3769

38-
# Test Run
39-
filebot -script fn:sysinfo
70+
# unknown package manager
71+
exit 127

0 commit comments

Comments
 (0)