-
Notifications
You must be signed in to change notification settings - Fork 0
/
bup.install
54 lines (49 loc) · 1.06 KB
/
bup.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
52
53
54
check_winsymlinks() {
for item in $(echo $MSYS | tr ' ' "\n"); do
key=$(echo "$item" | cut -d ':' -f 1)
if [[ "$key" = "winsymlinks" ]]; then
value=$(echo "$item" | cut -d ':' -f 2)
if [[ "$value" = "nativestrict" ]]; then
return 0
else
echo "winsymlinks set to nativestrict is required"
return 2
fi
fi
done
echo "MSYS=winsymlinks:nativestrict is required"
return 1
}
## arg 1: the new package version
pre_install() {
check_winsymlinks
}
## arg 1: the new package version
post_install() {
cd /usr/bin
rm -f bup
ln -sr /usr/lib/bup/cmd/bup.exe bup
#
cd /usr/lib/bup/bup/
rm -f _helpers.dll
ln -sr _helpers.so _helpers.dll
}
## 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() {
# do something here
#}
## arg 1: the old package version
# pre_remove() {
# rm -f /usr/bin/bup
# rm -f /usr/lib/bup/bup/_helpers.dll
# }
## arg 1: the old package version
#post_remove() {
# do something here
#}