Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-ports
Path: blob/main/Tools/scripts/git-diff-ports.sh
18878 views
1
#!/bin/sh
2
#
3
# MAINTAINER: [email protected]
4
5
set -e
6
set -o pipefail
7
8
export LC_ALL=C
9
10
##
11
## git-diff-ports.sh: returns the list of ports with uncommitted changes in the repository
12
##
13
14
# check that packaged dependencies are installed
15
16
for dep in git; do
17
if ! which -s $dep; then
18
echo "error: the '$dep' dependency is missing"
19
if [ $dep == "git" ]; then
20
echo "... please install the 'git' package"
21
fi
22
exit 1
23
fi
24
done
25
26
27
# MAIN
28
29
git diff HEAD "$@" |
30
grep "^diff " |
31
grep -v Mk/ |
32
grep -v Tools/ |
33
sed -E 's|diff --git a/||; s| .*||; s|([^/]+/[^/]+).*|\1|' |
34
grep -v '/Makefile$' |
35
sort |
36
uniq
37
38