-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathutils.install
51 lines (46 loc) · 1.28 KB
/
utils.install
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
51
## arg 1: the new package version
#pre_install() {
# do something here
#}
## arg 1: the new package version
post_install() {
if [ -f '/usr/bin/pacstrap' ] && \
! grep -q '# $setup' '/usr/bin/pacstrap'
then sed -i 's|$setup "$newroot"|# &|' '/usr/bin/pacstrap'
fi
if [ -f '/usr/bin/resolvconf' ] && \
! grep -q '# warn "could' '/usr/bin/resolvconf'
then sed -i 's|warn "could not detect a useable init system"|# &|g' '/usr/bin/resolvconf'
fi
if [ -f '/usr/bin/pamac' ]
then /usr/share/libalpm/scripts/fix-pamac
fi
if [ -f '/usr/bin/pactrans' ]
then /usr/share/libalpm/scripts/fix-pacutils
fi
if [ -f '/usr/bin/ldconfig' ]
then /usr/share/libalpm/scripts/fix-ldconfig
fi
if [ -f '/usr/bin/gamemoderun' ] && \
! grep -q '/rdbus' '/usr/bin/gamemoderun'
then /usr/share/libalpm/scripts/fix-gamemode
fi
}
## arg 1: the new package version
## arg 2: the old package version
#pre_upgrade() {
# do something here
#}
## arg 1: the new package version
## arg 2: the old package version
post_upgrade() {
post_install
}
## arg 1: the old package version
#pre_remove() {
# do something here
#}
## arg 1: the old package version
#post_remove() {
# do something here
#}