Compare commits
2 Commits
693c031124
...
e4ac1b6517
Author | SHA1 | Date | |
---|---|---|---|
e4ac1b6517 | |||
e21233f9a2 |
@ -3,10 +3,10 @@
|
|||||||
# Ensure that the following lines match the base PKGBUILD
|
# Ensure that the following lines match the base PKGBUILD
|
||||||
|
|
||||||
export retcode=0
|
export retcode=0
|
||||||
for term in pkgname replaces pkgver epoch pkgdesc url license ../LICENSE; do
|
for term in ^pkgname\= ^replaces\= ^pkgver\= ^epoch\= ^pkgdesc\= ^url\= ^license\= ../LICENSE; do
|
||||||
current="$(grep -E "^${term}=" ./PKGBUILD)"
|
current="$(grep -E "${term}" ./PKGBUILD)"
|
||||||
reference="$(grep -E "^${term}=" /opt/aninix/Uniglot/pacman/PKGBUILD)"
|
reference="$(grep -E "${term}" /opt/aninix/Uniglot/pacman/PKGBUILD)"
|
||||||
diff -w --color=always <(printf "${reference}") <(echo "${current}")
|
diff -w --color=always <(printf "${reference}") <(printf "${current}")
|
||||||
export retcode="$(( $retcode || $? ))";
|
export retcode="$(( $retcode || $? ))";
|
||||||
if [ "$retcode" != 0 ]; then
|
if [ "$retcode" != 0 ]; then
|
||||||
echo "$term has delta."
|
echo "$term has delta."
|
||||||
@ -24,4 +24,5 @@ if [ "$(basename "$PWD")" == 'Uniglot' ] && [ "$retcode" != 0 ]; then
|
|||||||
fi
|
fi
|
||||||
elif [ "$retcode" != 0 ]; then
|
elif [ "$retcode" != 0 ]; then
|
||||||
echo ERROR: PKGBUILD is out of sync with AniNIX/Uniglot.
|
echo ERROR: PKGBUILD is out of sync with AniNIX/Uniglot.
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
@ -21,7 +21,7 @@ for file in $files; do
|
|||||||
|
|
||||||
# Enforce each of the lines
|
# Enforce each of the lines
|
||||||
for line in '^# Etymology$' '^# Relevant Files and Software$' '^# Available Clients$' '^# Equivalents or Competition$'; do
|
for line in '^# Etymology$' '^# Relevant Files and Software$' '^# Available Clients$' '^# Equivalents or Competition$'; do
|
||||||
newlinenum="$(grep -nE "$line" "$file" | cut -f 1 -d ':')"
|
newlinenum="$(grep -m 1 -nE "$line" "$file" | cut -f 1 -d ':')"
|
||||||
|
|
||||||
# Case 1: Missing section
|
# Case 1: Missing section
|
||||||
if [ -z "$newlinenum" ]; then
|
if [ -z "$newlinenum" ]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user