-
Notifications
You must be signed in to change notification settings - Fork 72
Expand file tree
/
Copy pathmacports.sh
More file actions
94 lines (77 loc) · 1.37 KB
/
Copy pathmacports.sh
File metadata and controls
94 lines (77 loc) · 1.37 KB
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
#!/usr/bin/env sh
# Purpose: Macports support
# Author : 10sr
# License: Fair license (http://www.opensource.org/licenses/fair)
# Source : http://github.com/icy/pacapt/
# Copyright (C) 2010 - 2014 10sr
#
# Usage of the works is permitted provided that this instrument is
# retained with the works, so that any entity that uses the works is
# notified of this instrument.
#
# DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY.
_macports_init() {
:
}
macports_Ql() {
port contents "$@"
}
macports_Qo() {
if cmd="$(command -v -- "$@")"; then
port provides "$cmd"
else
port provides "$@"
fi
}
macports_Qc() {
port log "$@"
}
macports_Qu() {
port outdated "$@"
}
# macports_Rs may _not_implemented
macports_Rs() {
if [ -z "$_TOPT" ]; then
port uninstall --follow-dependencies "$@"
else
_not_implemented
fi
}
macports_R() {
port uninstall "$@"
}
macports_Si() {
port info "$@"
}
macports_Suy() {
port selfupdate \
&& port upgrade outdated "$@"
}
macports_Su() {
port upgrade outdate "$@"
}
# FIXME: update or sync?
macports_Sy() {
port selfupdate "$@"
}
macports_Ss() {
port search "$@"
}
macports_Sc() {
port clean --all inactive "$@"
}
macports_Scc() {
port clean --all installed "$@"
}
macports_S() {
# shellcheck disable=SC2153
case "$_EOPT" in
fetch*)
shift
port patch "$@"
;;
*)
port install "$@"
;;
esac
}