Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-ports-kde
Path: blob/main/Tools/scripts/git-diff-ports.sh
17720 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
awk -F / '/^diff/ && $2 !~ /[[:upper:]]/ && $3 !~ /^Makefile/ { print $2 "/" $3 }' |
31
sort -u
32
33